Problems already!? :(

This is a discussion on Problems already!? :( within the C++ Programming forums, part of the General Programming Boards category; Just starting my C++ journey on my mac, and downloaded code.blocks. According to the set instructional on this site, it ...

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    4

    Problems already!? :(

    Just starting my C++ journey on my mac, and downloaded code.blocks. According to the set instructional on this site, it says that at the end, pressing F9 should compile and run the 'hello world' program...

    Of course this doesn't work for me? I did not modify the code in any way but it still will not run the program and gives me what I believe is an error message?

    Titled at the top of the pop up: Terminal - bash - 80x24...

    What did I do wrong here?

    PLEASE HELP...

    Thank you!!!!!

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    106
    did you download a version of codeblocks with a mingw compiler, and look for the "build messages" tab near the bottom of screen and get the errors that are coming up

  3. #3
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,648
    You made a console application. The Terminal IS the console in the Mac, so it popped up the terminal when you ran it. What was inside the terminal window was likely the output of your program.

  4. #4
    Registered User
    Join Date
    Jul 2010
    Posts
    4
    Quote Originally Posted by rags_to_riches View Post
    You made a console application. The Terminal IS the console in the Mac, so it popped up the terminal when you ran it. What was inside the terminal window was likely the output of your program.

    I sort of figured that terminal was the console... Thanks for the clarification . I guess my real issue is why it didn't work when I made no changes to the code?

  5. #5
    Registered User
    Join Date
    Jul 2010
    Posts
    4

    nothing??/

    Can anyone tell me why i would have this problem even though I didnt make any changes to the code???

    I would REALLy appreciate any help...

    thank you!!!!

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    Perhaps it did work. The expected result of running a simple C++ program is a console popping up through which you can interact with your program. Can you post a screenshot of the console window that is showing up, along with the code you are compiling? (I know it's just the Hello, World! program, but still.)
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  7. #7
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,648
    You need to learn how to post a problem on an internet forum. All you said was it didn't work, without defining what exactly that meant. That is most definitely a HORRIBLE "bug report". It's like calling the doctor and just saying "It hurts" and hanging up, then calling the doctor back a couple of days later and saying, "It still hurts, why haven't you helped me?"

    I actually went through the trouble of installing Code::Blocks on my Mac and running the default Hello World program to see what happened for your post. Worked fine, and produced the terminal window as I mentioned...WHICH IS NORMAL.

  8. #8
    Third Eye Babkockdood's Avatar
    Join Date
    Apr 2010
    Posts
    352
    Did the Terminal window happen to look like this?

    http://img27.imageshack.us/img27/4413/picture1zdeh.png

    It sounds like you're just beginning programming. Two things you need to master before C++.

    One: You need to learn how to operate a computer without GUI. File paths, shell scripts, enviornment variables, executables, things like that. Anything you could possibly do on your Mac can be done in the Terminal.

    Two: You need to learn C. You're going to have a very hard time learning C++ if you don't know any C. C++ will come much, much easier if you know your way around C source code.

    If you need any help with either of these, feel free to PM me.

  9. #9
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,422
    Quote Originally Posted by Babkockdood View Post
    One: You need to learn how to operate a computer without GUI. File paths, shell scripts, enviornment variables, executables, things like that. Anything you could possibly do on your Mac can be done in the Terminal.

    Two: You need to learn C. You're going to have a very hard time learning C++ if you don't know any C. C++ will come much, much easier if you know your way around C source code.
    Absolute and utter nonsense.
    The first one has nothing to do with programming. Irrelevant. Though it is true that programmer tend to learn and use such stuff, it is not necessary.

    Two:
    o_O
    You do not need to learn C. Learning C before C++ will only cause headaches and stuff you need to unlearn later.
    In fact, some known professionals recommend that you do not learn C before C++.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Registered User
    Join Date
    Jul 2010
    Posts
    4
    Aloha,

    New question... Why do some letters type regularly yet others seem to be in a function mode??? For example the letters, i, a, s, z all do something and I cant seem to figure out how to type them in the code... I simply want to copy this code into the window, but i cant even type the word 'include' without the cursor being prompted into the search bar above??? (at least i think its a search bar...) i am committed to learning this, but i'm having trouble even typing my first code in there???

    you have all been so patient and kind so far... please continue to help! mahalo!!!


    #include <iostream>

    using namespace std;

    int main()
    {
    cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
    cin.get();
    }

  11. #11
    Registered User
    Join Date
    Jul 2010
    Posts
    1
    Hello !
    I am also a new member. Would a newcomer be warmly welcome here? Good day you guy !
    Last edited by Salem; 07-13-2010 at 09:18 AM. Reason: Removed fake spam sig-link

  12. #12
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,422
    hns615: I have no idea what you're talking about, but you may want to read this: << !! Posting Code? Read this First !! >>
    donnaj867: Certainly. Just be sure to read the stickies and ask smart questions. Remember: there are no dumb questions. Only dumb people.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Common Problems
    By WolfPack in forum C Programming
    Replies: 4
    Last Post: 01-28-2003, 05:38 PM
  2. tile colliision detection problems
    By werdy666 in forum Game Programming
    Replies: 1
    Last Post: 10-23-2002, 09:26 PM
  3. Coding Problems
    By RpiMatty in forum C++ Programming
    Replies: 12
    Last Post: 01-06-2002, 01:47 AM
  4. Problems with my RPG app
    By valar_king in forum Game Programming
    Replies: 1
    Last Post: 12-15-2001, 07:07 PM
  5. problems with too many warning messages?
    By Isometric in forum C Programming
    Replies: 9
    Last Post: 11-25-2001, 12:23 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21