Could Arduino ver.0017 act like a Visual C++ ?

Hi everyone,

I am a newbie in programming, i started reading reference book about programming, learning by myself. I would like to start with the basic principle, which might create the code much easier
Could i enter this code to the Arduino ver.0017?
If it can, it said....
20: error: iostream: No such file or directory In function 'int main()':
In function 'int main()':
Bad error line: -2


#include

using namespace std;

int main ()
{
cout << "My first C++ program." << endl;
cout << "The sum of 2 and 3 = " << 5 << endl;
cout << "7 + 8 = " << 7 + 8 << endl:

return 0;
}

Thanks everyone :slight_smile:

There is no iostream on the Arduino.
Simpler to use:

There's no "main" either. (well, there is, but not easy for you to get at).

Have a look at the reference pages

void setup () 
{
  Serial.begin (9600);
}
 
void loop ()
{
 Serial.println ("My first Arduino program.");
 Serial.print ("The sum of 2 and 3 = ");
 Serial.println (5);
 Serial.print ("7 + 8 = ");
 Serial.println (7 + 8); 
}

OH, Thanks !
i forgot there is a reference on the Arduino Homepage
Thanks!! :slight_smile:

see this page for how to do streaming on Arduino: Arduino Playground - StreamingOutput