Shoutbox

C++ Tutorials and Beginner Stuff - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: C++ Tutorials and Beginner Stuff (/showthread.php?tid=48701)

C++ Tutorials and Beginner Stuff by Reaper on 08-09-2005 at 02:42 PM

I needa learn C++ for my degree (yes i know its a long way off but i want the knowledge for when i start:P)
what i wanna know is, are there any good sites giving totally newb tutorials and maybe source code?!


RE: C++ Tutorials and Beginner Stuff by Dempsey on 08-09-2005 at 02:48 PM

http://www.cplusplus.com/doc/tutorial/ is good


RE: C++ Tutorials and Beginner Stuff by Reaper on 08-09-2005 at 02:55 PM

thanks. btw im using Microsoft Visual C++ but i dont how to "run" the code. When usings Visual Basic you could just press run and voila, but how do you do it in Visual C++?


RE: C++ Tutorials and Beginner Stuff by DJeX on 08-09-2005 at 02:57 PM

Click Build in the Build menu. Then click Execute "fileName" from the build menu.

Also you want to check out this book I am useing. Teach yourself Visual C++ 6 in 21 days. It's quite a nice book.

Teach Yourself Visual C++ 6 in 21 days


RE: C++ Tutorials and Beginner Stuff by Reaper on 08-09-2005 at 03:00 PM

its not working. i get an error:

"Cannot execute program"

and i copied the code from the tutorial site:

// my first program in C++

#include <iostream.h>

int main ()
{
  cout << "Hello World!";
  return 0;
}

Your link gave me a 404 :P


RE: C++ Tutorials and Beginner Stuff by ShawnZ on 08-09-2005 at 03:02 PM

Try opening the project folder and running the projectname.exe file manually.


RE: C++ Tutorials and Beginner Stuff by DJeX on 08-09-2005 at 03:05 PM

Try this

code:
#include "stdafx.h"

int main(int argc, char* argv[])
{
    printf("Hello World!\n");
    return 0;
}

RE: C++ Tutorials and Beginner Stuff by Reaper on 08-09-2005 at 03:05 PM

um the odd thing is, there is no .exe file in the project folder :|
i click Build exe and i get the Windows Astrisk beep lol
if i click Execute Test1.exe is asks me if i want to create, i press yes then it gives me the error i mentioned above

[Edit] nope that code doesnt work either DJeX


RE: C++ Tutorials and Beginner Stuff by DJeX on 08-09-2005 at 03:08 PM

Thats because your code has errors, it will not make the exe with errors. Try my code.


RE: C++ Tutorials and Beginner Stuff by Reaper on 08-09-2005 at 03:11 PM

but i copied the code exactly from the tutorial!


RE: C++ Tutorials and Beginner Stuff by DJeX on 08-09-2005 at 03:12 PM

quote:
Originally posted by Reaper66613
[Edit] nope that code doesnt work either DJeX

Well it should, umm try this. Click File > new. Then click the Projects tab. Then click Win32 Console Application. Enter a name. Click ok.  Then select "A "Hello World!" Application then click finish then ok. Now try it. Its the same as what your original code would do.

RE: C++ Tutorials and Beginner Stuff by Reaper on 08-09-2005 at 03:13 PM

yeh that works!
but what was wrong with the code i was using?


RE: C++ Tutorials and Beginner Stuff by DJeX on 08-09-2005 at 03:20 PM

quote:
Originally posted by Reaper66613
yeh that works!
but what was wrong with the code i was using?
I'm not sure why your code won't work in Visual C++ 6, it works in my Borland C++ Builder 6.
RE: C++ Tutorials and Beginner Stuff by Reaper on 08-09-2005 at 03:21 PM

bah. that means the other code in the tutorial codes wont work will they?!


RE: C++ Tutorials and Beginner Stuff by DJeX on 08-09-2005 at 03:50 PM

I'm not sure, whats the site? I'll check.

If you want to learn C++ the proper way read that book I posted.


RE: C++ Tutorials and Beginner Stuff by Reaper on 08-09-2005 at 03:54 PM

it wos the link posted by Dempsey and the PDF file is corrupt and didnt load :(


RE: C++ Tutorials and Beginner Stuff by DJeX on 08-09-2005 at 04:35 PM

Corrupt :S How stupid, it works on my comp with that link. Humm, ok try this link but this time right click it then click Save Target As. Save it to your computer then open the pdf file.

http://www.musicrelatednetwork.net/Teach%20Yourse...1%20days%20NEW.pdf