Results 1 to 10 of 10

Thread: C++ is Wrecking my Nerves!

  1. #1
    Depression Moon's Avatar
    Join Date
    Aug 2007
    Location
    Warrior Falls
    Posts
    6,050
    Articles
    45
    Blog Entries
    2
    Contributions
    • Former Editor

    Default C++ is Wrecking my Nerves!

    I'm using Visual studio C++2008 Microsoft. I have a problem here. Whenever I try to debufg code I get a window that asks me if I want to build Win32. I click yes it starts compiling and then I get build errors and it asks if I want to run the last successful build. When I try that it says the file cannot be found and symbols are not loaded and if I would like to continue debugging. When I click yes I get a final window saying no DLL specified. What's up here?

  2. #2
    Very VIP person Tech Admin Rantz's Avatar
    Join Date
    Apr 2006
    Posts
    17,631
    Articles
    1

    Default

    When it asks you if you want to run the last successful build, it's talking about the last time you built the program without any errors. I'm guessing you haven't built the program successfully yet, which is why it can't find a last successful build. So the core of your problem is in those build errors. What is your code and what errors are you getting?

  3. #3
    Depression Moon's Avatar
    Join Date
    Aug 2007
    Location
    Warrior Falls
    Posts
    6,050
    Articles
    45
    Blog Entries
    2
    Contributions
    • Former Editor

    Default

    This is the code
    #include <iostream>
    using namespace std;
    int main()
    {
    char x ='a';
    char y ='c';
    cout << ++x << endl;
    cout << y++ << endl;
    cout << (x > y) << endl;
    cout (x-y) << endl;
    system ("pause")
    return 0;


    And I'm not exactly sure what the errors are since I can't debug the code and find out if there are any. The window that says I have build errors doesn't tell me what they are exaclty and this happens no matter what code I am writing.
    Last edited by Depression Moon; 06-12-2009 at 10:35 PM.

  4. #4
    Very VIP person Tech Admin Rantz's Avatar
    Join Date
    Apr 2006
    Posts
    17,631
    Articles
    1

    Default

    There should be an output panel that tells you the build errors, but I don't have access to Visual C++ here and I can't remember what it's called. Anyway, there are a few problems (corrected in red) I can spot immediately:

    #include &lt;iostream>
    using namespace std;
    int main()
    {
    char x ='a';
    char y ='c';
    cout << ++x << endl;
    cout << y++ << endl;
    cout << (x > y) << endl;
    cout << (x-y) << endl;
    system ("pause"); // Dunno what this function is, it may require including another library
    return 0;
    }

    I just started this stuff though, so someone else can probably help you more xD

  5. #5
    That's me! blackmage_nuke's Avatar
    Join Date
    Aug 2005
    Location
    Yes
    Posts
    8,503
    Blog Entries
    3

    Default

    If your using Visual C++ you go to view in the menu bar at the top, other windows, error list

    Then there should be a error list tab down the bottom, in there it has a button (some number) errors, click it and it will show the lines where your errors are and a vague indication to what the error is (some are more vague than others).
    Kefka's coming, look intimidating!
    Have a nice day!!

  6. #6
    Depression Moon's Avatar
    Join Date
    Aug 2007
    Location
    Warrior Falls
    Posts
    6,050
    Articles
    45
    Blog Entries
    2
    Contributions
    • Former Editor

    Default

    I posted that code wrong i had the iostream and last bracket part. After adding in the missing << and attempting another debug the same thing happens. I am getting no errors from the error list that blackmage nuke pointed out to me.

  7. #7
    That's me! blackmage_nuke's Avatar
    Join Date
    Aug 2005
    Location
    Yes
    Posts
    8,503
    Blog Entries
    3

    Default

    Are you sure you clicked the button that has a number and then "errors" (if you have no errors it should say "0 errors", if you have some it will say 1 errors or 2 errors)

    Copy paste your revised code
    Kefka's coming, look intimidating!
    Have a nice day!!

  8. #8
    Depression Moon's Avatar
    Join Date
    Aug 2007
    Location
    Warrior Falls
    Posts
    6,050
    Articles
    45
    Blog Entries
    2
    Contributions
    • Former Editor

    Default

    #include <iostream>
    using namespace std;
    int main()
    {
    char x ='a';
    char y ='c';
    cout << ++x << endl;
    cout << y++ << endl;
    cout << (x > y) << endl;
    cout << (x-y) << endl;
    system ("pause");
    return 0;
    }

    Yeah 0 errors, warnings, and 0 of this funky i thing in a white circle

    Edit: I posted the iostream part, but for some reason it's not showing on this site????????

  9. #9
    That's me! blackmage_nuke's Avatar
    Join Date
    Aug 2005
    Location
    Yes
    Posts
    8,503
    Blog Entries
    3

    Default

    Hmm thats odd, the code works for me. Is the code in a .cpp file in the Source Files Folder?

    Try go to files Save All. Does it ask if you want to Build when you run it?

    Try start a new empty project and copy paste your code into a new .cpp file in the source files folder.
    Kefka's coming, look intimidating!
    Have a nice day!!

  10. #10
    diafnaoplzkthnxbai NeoTifa's Avatar
    Join Date
    Jun 2005
    Location
    in psy's panties <3
    Posts
    3,411

    Default

    It wont build because you touch yourself at night. Tell ya what. I will help you. See that userbar in my sig? Click it. All your answers and cpp fantasies shall be granted.
    Oh gods, why? ಥ_ಥ


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •