Hello World,
I'm a c++ beginner and i've diced to study. So this is my first code:
#include <iostream>
using namespace std;
double d = 2.2;
int i = 7;
void some_function()
{
d = d + i;
i = d * i;
printf("%d\n", d);
printf("%d\n", i);
}
int main(){
return 0;
}
when i try to compile this, i get this answer:
a.cpp: In function ‘void some_function()’:
a.cpp:11: error: ‘printf’ was not declared in this scope
It's a elementary mistake but i can't see. If you can help me...