Charas-Project

Off-Topic => Really Old Stuff => Archive => General programming => Topic started by: maxine on September 12, 2005, 05:26:27 AM

Title: C++
Post by: maxine on September 12, 2005, 05:26:27 AM
ok.. I havent been her so much lately. I have been busy in school and in my class we have c++... We´ve pretty much just learnt how too make a program which draws a text on the black screen or simply just multiplies the number you type in (Variable).


//Bla bla bla
#include
using namespace std;

int main()
{
          << cout "Hello Charas" << endl;
           getchar ();
           return o;

}


that is for example but i need a tutorial of some more variables etc.

thanks in advance
Title:
Post by: Osmose on September 12, 2005, 10:00:56 AM
Okay, first,

Quote
<< cout "Hello Charas" << endl;


Should be

Quote
cout << "Hello Charas" << endl;


Second of all, you havent put in a variable for Getchar() to record.
EDIT: You're right, you don't need a .c after iostream.

Quote
#include

int main {
int o, p, q
cout << "Please enter a number to be multiplied." << endl;
o = Getchar();
cout << endl; << "Please enter a second number to be mutliplied." << endl;
p = Getchar();
q = o * p
cout << endl; << o << " times " << p <<  " equals " << q << endl;
}


Granted, it's been awhile since I touched C++ and that's probably wrong in a few places, but meh.

Also, Google is your friend (http://www.google.com/search?hl=en&q=c%2B%2B+tutorials&btnG=Google+Search).
Title:
Post by: maxine on September 12, 2005, 11:35:11 AM
oh yeah i did a mistake with the <<... But i didnt have too make iostream.c i only needed iostream in class.. And i know how too make the number multiply itself, and what i asked was a good page for some extended coding of variables and other stuff.. But i can see you know coding =)...

EDIT: ive tried google but havent founded any really good pages... So if anyone know any good ones feel free too tell them too me :D
Title:
Post by: Osmose on September 12, 2005, 11:49:56 PM
Taken from the link to Google in my post above,  this (http://www.cprogramming.com/tutorial.html#c++tutorial),  this (http://www.cplusplus.com/doc/tutorial/), and  this (http://www.intap.net/~drw/cpp/) all look like good tutorials to me.
Title:
Post by: maxine on September 14, 2005, 05:13:59 AM
thanks man really nice