C++ Trainer Skeleton

Posts 16–30 of 41 · Page 2 of 3
Quote Originally Posted by clone
i'm software eng., i'm a student.
so i would like to know more about programming, i mean to build a system. my projet last year is on xml, and file maker pro. ca u help me out???
Build a system?
You won't get deprecation errors on VS 2003. Microsoft doesn't follow this standard, I guess you would call it, since the entire C/C++ programming community, besides Microsoft, has embraced this. Try running the code on mingw32 and you'll get the error, but it works fine in VC++.

But anyways, we are getting off topic. Like I said, that is ANSI C, type it into a C only compiler and it will run.
ok guys apology for the interruption, I’m quite interested to learn C++ but have no initial background or knowledge bout this whatsoever, so where should I start first?
anyway I start reading several introductions & tutorials, but what specific program could i execute this?
im with associate...wtf
I've done some research & i think they run this thing using some sort of compiler, say, could you guys provide us with some links where to download one?
I will help you when I get home.
Errr, yeah...

The best thing to learn from, besides a class, is books. Go to a bookstore one day and just read them.

C++ isn't cake, so just remember that. To run a C++ program, you need to write it then compile it. Compiling it turns it into an exe which your machine can execute.

To compile sources you need a C++ compiler. I recommend for windows users mingw32. Its a port of GCC. Anyone using a nix, you already should have a c compiler installed (try "cc" or "gcc").

Here is a site with a development environment: www.codeblocks.org
If you can't afford a book, simply look up tutorials or ebooks on the internet. They are of great help but, a mess if you can only read it on your computer.

GCC is a free compiler and pretty easy to use compared to VS. It will handle all your compiling needs, if you don't like it try VS or just google up a list of other free compilers. You shouldn't get in C++ unless you have had prior programming knowledge.
Trust me. C was the first language I learned, and it was hell. But I got throught but only through lots of effort, lots of frustration, and lots of effort. I suggest starting easier. BASIC is a good place to begin, if you want to go the nix way, I suggest perl because it is awfully easy but it can do anything.
I suggest learning VB. Its hella easy if you are in a class or look at some tutorials. VB.net is something you should look into compared to normal VB. Perhaps learning PHP will make learning higher languages such as C++ easier.
Don't expect them to be the same. Neither perl nor PHP nor VB to some extent (not counting references) touch the concept of the C pointer and most people spend months trying to figure these out (it took me like, a year...how slow I am)
Just wait until you get to pointers.

Arrays aren't that hard...its probably because you haven't had to use them yet.

Here's a basic example with some - say I want to print out three numbers. You'd say well make three int variables.
Code:
int i1, i2, i3;
cout << i1 << i2 << i3;
But what about 5?

Code:
int i1, i2, i3, i4, i5;
cout << i1 << i2 << i3 << i4 << i5;
100?

Code:
int i1, i2, i3, i4, i5, i6, i7, i8...
cout << i1 << i2 << i3 << i4 << i5 << i6...
Exactly. Simple make an array of 100 size

Code:
int i[99]; //remember, computers count from 0, so this is the correct size
and use a for loop to print them out.
so here is an example. it both initializes and prints an array of ones.

Code:
#include <iostream>

int main() {
  int i[99], x;
  for(x=0;x<100;x++) {
    i[x] = 1; //reference member 'x' of array i
  }
  for(x=0;x<100;x++) {
    cout << i[x] << endl;
  }
  return 0;
}
BTW: Arrays start with 0, thats why he set the size of the array to 99...
Quote Originally Posted by arunforce
If, I remember correctly, with my limited knowledege of C++, printf is useable in C++ and C#.

Dave kept trying to make me use printf instead of std::cout << ""

I thought C# had more of a Java syntax.... o.o
Posts 16–30 of 41 · Page 2 of 3
This thread is closed for replies.

Similar Threads

Talk with us