• Advertisement
Sign in to follow this  

Help, i just started learning....

This topic is 3938 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is probably a really newb question, i'm sorry. i've just started learning today... Im using this book to help me learn, and right now im trying to do "hello world". the steps its having me do is.... 1. Create a source code file with a .cpp extension. (did this) 2. Compile the source code in to an object file with the .obj or .o extension. (did this) and then 3. Link your object file with any needed libraries to produce an executable program. (after this step i think i run it?) i dont know what to do there (step 3), how do i link it? im using Code::blocks btw. and what i've done so far is this... #include <iostream> int main() { std::cout << "Hello World!\n"; return 0; } what does it mean to link it exactly? i guess thats where im confused at.

Share this post


Link to post
Share on other sites
Advertisement
when you compile the cpp files they are converted in obj files.Then they are linked,it takes the needed parts from them and from included libraries,and creates the executable file.

Share this post


Link to post
Share on other sites
zomg i did it! i dont know what i was doing wrong, ill go back and see later. but i made it say hello world. i'm one step closer to learning to program! :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement