Valhalla Legends Archive

Programming => General Programming => C/C++ Programming => Topic started by: neoxgold on January 02, 2004, 10:01 PM

Title: plz help wit c++, new to this!
Post by: neoxgold on January 02, 2004, 10:01 PM
hi, i was introduced to c++ by grok, because he said i was still young to learn vb... so can sum 1 here explain c++ to me in a way i can understand it?
thx! :)
Title: Re:plz help wit c++, new to this!
Post by: Spht on January 02, 2004, 10:08 PM
Quote from: neoxgold on January 02, 2004, 10:01 PM
hi, i was introduced to c++ by grok, because he said i was still young to learn vb... so can sum 1 here explain c++ to me in a way i can understand it?
thx! :)

Start with C.
Title: Re:plz help wit c++, new to this!
Post by: neoxgold on January 02, 2004, 10:10 PM
ok..... than can sum 1 here explain c to me, in a simple way? the introduction of c..
Title: Re:plz help wit c++, new to this!
Post by: iago on January 02, 2004, 11:20 PM
play with this:

#include <stdio.h>
int main()
{
   printf("This is a test!\m");
   for(int i = 0; i < 10; i++)
   {
       printf("i = %d\n", i);
   }
   return 0;
}

If you don't have a compiler, get one from www.bloodshed.net
Title: Re:plz help wit c++, new to this!
Post by: MoNksBaNe_Agahnim on January 02, 2004, 11:46 PM
I don't think you need to know C before C++...although i guess it could depend on the person's age.

C++ is a language that can do anything you need...best way i can describe it haha
Title: Re:plz help wit c++, new to this!
Post by: iago on January 03, 2004, 07:16 AM
C and C++ have some limitations.  Basically, some things, while they can all be done, take a lot of effort to do.  Just as an example, RMI in Java same TONS of trouble in C++ :)
Title: Re:plz help wit c++, new to this!
Post by: Kp on January 03, 2004, 12:14 PM
Quote from: iago on January 03, 2004, 07:16 AM
C and C++ have some limitations.  Basically, some things, while they can all be done, take a lot of effort to do.  Just as an example, RMI in Java same TONS of trouble in C++ :)

RMI = Remote Method Invocation?  If so, sounds much like RPC, which has been pretty easy to set up under Unix C implementations for a while, with the aid of rpcgen.
Title: Re:plz help wit c++, new to this!
Post by: Skywing on January 03, 2004, 12:19 PM
I think that would be fairly easy under Win32 if you knew ATL and C++.
Title: Re:plz help wit c++, new to this!
Post by: iago on January 03, 2004, 12:24 PM
There's other things too.  Mostly because they have a huge collection of classes to do pretty much everything from downloading websites to calling remote methods, etc.  I'm sure it can be done in C++, but I'm not sure that anybody has.  
Title: Re:plz help wit c++, new to this!
Post by: Skywing on January 03, 2004, 02:48 PM
Quote from: iago on January 03, 2004, 12:24 PM
There's other things too.  Mostly because they have a huge collection of classes to do pretty much everything from downloading websites to calling remote methods, etc.  I'm sure it can be done in C++, but I'm not sure that anybody has.  
There are plenty of libraries to do that from C/C++ on just about every major platform - for instance WinInet or WinHTTP for Win32.
Title: Re:plz help wit c++, new to this!
Post by: Grok on January 03, 2004, 04:33 PM
Quote from: iago on January 03, 2004, 12:24 PM
There's other things too.  Mostly because they have a huge collection of classes to do pretty much everything from downloading websites to calling remote methods, etc.  I'm sure it can be done in C++, but I'm not sure that anybody has.  

Not being sure that anybody has is a far cry from nobody has done.

What I try to make clear to my managers at work is the answer is always "yes".  Whatever business problem we could possibly come up with at our little company (< 500 employees), has been met and conquered at hundreds or thousands of companies around the world.

Same thing here, C++ is in such widespread use that just about every possible useful and popularly needed library has been written dozens of times.
Title: Re:plz help wit c++, new to this!
Post by: neoxgold on January 04, 2004, 08:06 AM
how come when i compile my c project, and run it. it would pop up for like 1 sec and dissapear? :-\
Title: Re:plz help wit c++, new to this!
Post by: iago on January 04, 2004, 08:12 AM
It's closing when it's finished.

At the top,
#include <stdlib.h>

Before your main function's return:
system("pause");

that's the easiest way.
Title: Re:plz help wit c++, new to this!
Post by: imablackhat on January 04, 2004, 11:32 AM
Yeah I'm new to C++ too, I used to program in Visual Basic 6.0. Which I don't consider programming since its so basic and simple. I don't have a windows C++ compiler, so I use linux gentoo's G++ compiler. Can anyone point out some good tutorial/source code learning websites for this? Thanks.  :P
Title: Re:plz help wit c++, new to this!
Post by: MrRaza on January 04, 2004, 12:28 PM
easiest think to do is search google or read a book.
Title: Re:plz help wit c++, new to this!
Post by: Grok on January 04, 2004, 01:17 PM
Quote from: imablackhat on January 04, 2004, 11:32 AMI used to program in Visual Basic 6.0. Which I don't consider programming since its so basic and simple.

cute!
Title: Re:plz help wit c++, new to this!
Post by: Kp on January 04, 2004, 01:30 PM
Quote from: imablackhat on January 04, 2004, 11:32 AM
Yeah I'm new to C++ too, I used to program in Visual Basic 6.0. Which I don't consider programming since its so basic and simple. I don't have a windows C++ compiler, so I use linux gentoo's G++ compiler. Can anyone point out some good tutorial/source code learning websites for this? Thanks.  :P

There are Windows ports of GCC available, though they're rarely up with the most current GCC release.  Check out Minimalist GNU for Windows (http://www.mingw.org/).  They have support for compiling C, C++, and Java (yes, you can actually compile Java to native code, as opposed to Java byte code -- their implementation of JCF is incomplete though, so some things don't work).