|  | 
|  | 
| вернуться в форум | Общий форумpritf; scanf; c++ (visual studio) Please, help me understand, how turn on printf and scanf in my program.If I write :
 int Solution (int n, int a, int b)
 {
 return (2*n*a*b);
 }
 
 int main()
 {
 int n,a,b;
 scanf ("%d %d %d", &n, &a, &b);
 printf ("%d", Solution (n,a,b));
 return 0;
 }
 
 system will throw "Compilation error" with
 vtje2d-4h6iqg.cpp(9) : error C3861: 'scanf': identifier not found
 vtje2d-4h6iqg.cpp(10) : error C3861: 'printf': identifier not found.
 
 If i write the same, with #include "stdafx.h" on the top, system will throw "Compilation error" with
 rvkkio-7db2pu.cpp(4) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Re: pritf; scanf; c++ (visual studio) #include <cstdio>
 Edited by author 30.03.2016 12:44
 | 
 | 
|