Learning C++ (Using Visual C++)

Talk about your favorite PC games, Steam and building awesome custom rigs!

Moderator: Moderators

Post Reply
ghosstt
Senior Member
Posts: 1551
Joined: Mon Feb 26, 2007 4:14 pm

Learning C++ (Using Visual C++)

Post by ghosstt »

Well, I already know vb.net, and just installed visual C++ and Visual C#. I'm really interested in learning C++ after all the stuff that Marshallh does with it.
So a few questions:
Is Visual C++ a good IDE to use? I'm used to the .net IDE so I thought it would help
Can someone link me to a few really good tutorials? I learned vb.net in school, so the teacher actually explained things and stuff, so a tutorial like that would be nice.
Is it worth learning it?
Black Six
Moderator
Posts: 1991
Joined: Sun Apr 04, 2004 4:34 pm
360 GamerTag: Black 5ix
Location: MD

Re: Learning C++ (Using Visual C++)

Post by Black Six »

It's definitely worth it, C++ is so much more powerful than Visual Basic. As for a tutorial, I'd suggest starting with this.
"It's not that life's so short, it's just that you're dead for so long." -Anonymous
Threads Closerized: Lost Track, Whoops
ghosstt
Senior Member
Posts: 1551
Joined: Mon Feb 26, 2007 4:14 pm

Re: Learning C++ (Using Visual C++)

Post by ghosstt »

Ok. I did a hello world program before in C++, and I noticed one thing:
All the tutorials I followed dont leave the program open. (Which I understand, because it does exactly what I coded it to do, output, and thats it)

I found that I can either do a SYSTEM("") type deal, but that's resource heavy, or I could do a double cin.get()

How come they don't explain this to you in any of the tutorials? Am I missing something?

@BlackSix:

Code: Select all

int main ()
{
  cout << " Hello World!";
  return 0;
}
That's from the tutorial you posted, thanks btw. But that would just close after it runs right? How come they don't tell you that? :roll:

Anyways, is visual C++ the best IDE to be using? Or is there a better one out there?
MegatronUK
Posts: 177
Joined: Sat Apr 04, 2009 12:08 pm

Re: Learning C++ (Using Visual C++)

Post by MegatronUK »

ghosstt wrote:Ok. I did a hello world program before in C++, and I noticed one thing:
All the tutorials I followed dont leave the program open. (Which I understand, because it does exactly what I coded it to do, output, and thats it)

I found that I can either do a SYSTEM("") type deal, but that's resource heavy, or I could do a double cin.get()

How come they don't explain this to you in any of the tutorials? Am I missing something?

@BlackSix:

Code: Select all

int main ()
{
  cout << " Hello World!";
  return 0;
}
That's from the tutorial you posted, thanks btw. But that would just close after it runs right? How come they don't tell you that? :roll:

Anyways, is visual C++ the best IDE to be using? Or is there a better one out there?
Because you told it to do one thing (print "hello world") and then to close (return). It did exactly what you told it to. If you want it to continue running then you'll need to put some sort of loop structure in and tell it to do something else (whatever else you want it to do).
Have you taken any basic programming classes or courses (not basic the language, basic as in fundamentals)? It would be useful to learn the fundamentals of programming - program flow and execution, control structures, differences between compiled and interpreted languages etc.

If you want to learn C++ the language, then IMO you'd be better off starting with a simple command line compiler (gcc or mingw) and your favourite text editor to understand how C and C++ programes are compiled, linked and built, rather than going in at the deep end with a full blown IDE and gui builder.
Black Six
Moderator
Posts: 1991
Joined: Sun Apr 04, 2004 4:34 pm
360 GamerTag: Black 5ix
Location: MD

Re: Learning C++ (Using Visual C++)

Post by Black Six »

That's how it's supposed to behave. If you want it to wait at the end in Visual Studio you have to select 'Run without Debugging' I believe. Or if you're already using that one, select the other one, I can't remember for sure offhand.
"It's not that life's so short, it's just that you're dead for so long." -Anonymous
Threads Closerized: Lost Track, Whoops
Post Reply