Re: An Introduction to Programming, For beginners
Posted: Fri Jan 23, 2009 11:47 pm
That's what I had thought I was wondering about that...
The Next Generation of 2D Roleplaying Games
http://elysianshadows.com/phpBB3/
I knew what it meant.. I'm just saying we both said the same thing but you said it with actual code.Ginto8 wrote: You kinda missed my point. You'll have to wait until you get to operator overloading to understand.
Oh, okay.dandymcgee wrote:I knew what it meant.. I'm just saying we both said the same thing but you said it with actual code.Ginto8 wrote: You kinda missed my point. You'll have to wait until you get to operator overloading to understand.
Code: Select all
// BoolTest - compare variables input from the
// keyboard and store the results off
// into a logical variable
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
// set output format for bool variables
// to true and false instead
// of 1 and 0
cout.setf(cout.boolalpha);
// initialize two arguments
int nArg1;
cout << “Input value 1: “; <------------------------------------------------ I get the Error right here!
cin >> nArg1;
int nArg2;
cout << “Input value 2: “;
cin >> nArg2;
bool b;
b = nArg1 == nArg2;
cout << “The statement, “ << nArg1
<< “ equals “ << nArg2
<< “ is “ << b
<< endl;
// wait until user is ready before terminating program
// to allow the user to see the program results
system(“PAUSEâ€);
return 0;
}
Code: Select all
brackets!
As for the error, can you tell us exactly what the compiler says? Going "OMG I HAS AN ERROR ON THIS LINE WHAT'S WRONG WITH IT????" doesn't help the people trying to help you. If you post the error, it gives your helpers clues as to what they have to look for. :) ;)
I haven't seen you around here before, so welcome to the forum! :mrgreen:
Have you heard of F#? Apparently it is being made by the same guy who made C#, and it will be better. I'm not even sure if the F# thing is true though, can someone confirm? For now, I thing Java and C++ will be the big ones in the future. well... scratch java.EdEown wrote:What about C# ?
Eaven if it is not popular so much...it has great potential for the future I think, at least it is made to improve C++.
Guild wars 2 team is using it for some specific stuf :P
Yes there is a language called F#. It's a .Net language and it's not even close to new, it first appeared around 2002 although it isn't distributed yet it will be shipped with Visual Studio 2010 or so we're told...........OmegaGDS wrote:Have you heard of F#? Apparently it is being made by the same guy who made C#, and it will be better. I'm not even sure if the F# thing is true though, can someone confirm? For now, I thing Java and C++ will be the big ones in the future. well... scratch java.EdEown wrote:What about C# ?
Eaven if it is not popular so much...it has great potential for the future I think, at least it is made to improve C++.
Guild wars 2 team is using it for some specific stuf :P