Thread: Need opinion...
View Single Post
Old Jan 19th, 2005, 4:08 PM   #25
Broax
Hobbyist Programmer
 
Broax's Avatar
 
Join Date: Jan 2005
Location: Porto, Portugal
Posts: 142
Rep Power: 4 Broax is on a distinguished road
Send a message via MSN to Broax
no man... this ain't my intro thread!

The intro thread is the "hello" one... :p BTW, since you're driking beers tell me exactly how strong that beer is... 'cause my (german) cousin once told me that american beer is like making love on a canoo... fucking close to water!

lolol How I love this one! Anyway...

Osiris, thanks a lot for the code, but now I'm having problems with this (diferent code) which is:

/*Why oh why can't I handle a 
lot of variables!? I don't know
but I will sure try now... :D */

#include <iostream>
using namespace std;

string var_myname;
int var_num1;
int var_num2;

string var_myname = "Joao Oliveira (aka broax)"; //I didn't know I had to specify the variable type even when I'm defining it! 
int var_num1 = 10;
int var_num2 = 9;

int main();
{
int total;
var_total = var_num1 + var_num2;
    
    cout << "So let's try some more of this baisc programming stuff /n" << endl;
    cout << "My name is " var_myname "and I'm " var_total "years old." << endl;
    
    return 0;
}

I think it's easy to see what I'm attempting to do... this would just output my name and my age, but (and this is the fancy part) the age would be a sum between to variables.

I'm getting all sorts of errors but most of them are repeated...

Also, as far as the tutorial told me, and external variable is a variable that works with other files of the program... like file_a.dfg has a variable that can also be used by file_b.dfg (that's what I understood, at least.

Anyway, what kind of stupid errors have I made!?
__________________
PORTUGALPORTUGA
PORTUGALPORTUGA
PORTUGALPORTUGA
PORTUGALPORTUGA
PORTUGALPORTUGA
Broax is offline   Reply With Quote