PDA

Click to See Complete Forum and Search --> : Totally new to 'C'


Cease
Jul 12th, 2000, 04:16 PM
Okay i have only just become interested in programming c (i mean just this second) and i just want to know what i need to start (eg programs) and where i can get them and for how much?????

Also is it possible to make windows like in vb using c or c++?????

Oh one last thing where can i get basic tutorials on how to program useful c (when i say useful i mean not a program that adds 1 and 17 for example :o), )
Thanx

Jul 12th, 2000, 05:12 PM
You might have to start out with programs that add 1 and 17. C++ is not something you learn over night. Generally, it takes much longer than VB to learn.

Yes, using C++, you can make Windows Applications. What you need to start is a compiler. That will depend on which one you want. Two of the more popular ones are Borland C++ and Visual C++. You can get the Modal Edition of Visual C++ for $60 CDN. The Professional and Enterprise edition's are a little more expensive, although, I believe you can get it at acedemic pricing for $100 USD, if you are a student.

You can find some tutorials and Discussion Forums at http://www.planet-source-code.com.

SteveCRM
Jul 22nd, 2000, 07:08 PM
I had bought a box, learn C in 24 hours, in the box was the sams book for C and the learning edition of Borland C++ 3.0(I think) And it shows how to add and everything, it is really good so far. Look for it, its in a yellow box, and it was only $30.

to add 1 and 17(if my memory searves me right, I don't have the book with me):

#include <stdio.h>

int integer_add(x, y);
Add = x, y;
return int;

int main()
{
int integer_add(1, 17);
Add = (x + y)
return 0;
}

hope that helps any :)

parksie
Jul 23rd, 2000, 05:00 AM
yikes.

#include <stdio.h>

int integer_add(int x, int y) {
return (x + y);
}

int main() {
int res = integer_add(1, 17);
printf("%d", res);
return 0;
}

Is that what you meant?


[Edited by parksie on 07-29-2000 at 06:35 AM]

SteveCRM
Jul 23rd, 2000, 11:39 AM
Wow, I was pretty off! I think I better start reading that book more carefully. Sorry. Thanks parksie.

Jul 23rd, 2000, 01:02 PM
I had something like that,

but what is the d% for(I havent looked at my C book for a long time)?

Jul 23rd, 2000, 01:32 PM
I believe it means to format and display "res".

HarryW
Jul 23rd, 2000, 01:53 PM
'%' is an escape character for variables in the printf function, just like '\' is an escape character for characters in strings in C (like "\n" is a newline).

If it was a character it would be %c I think, can't remember exactly. I'm too used to the C++ versions cout and cin.

parksie, did you forget the opening curly bracket for the integer_add() function or can it be omitted?

parksie
Jul 29th, 2000, 05:35 AM
Aarrrgh!!!

Sorry. It does need a bracket, I just can't type. (edits post).

Thanks HarryW.