I'm getting compile error in this code
#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
void main(int argc,char *argv[])
{
int i;
for(i = 0;i<10;i++)
fprintf(cout,"%d\n",i);
fprintf(cout,"abc:\n");
string s;
cin>>s;
if(s == "resume") {
for(i = 0;i<10;i++)
fprintf(cout,"%d\n",i);
}
}
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.
try.cpp C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C 4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
try.cpp(9) : error C2664: 'fprintf' : cannot convert parameter 1 from 'std::ostr eam' to 'FILE *' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called
try.cpp(10) : error C2664: 'fprintf' : cannot convert parameter 1 from 'std::ost ream' to 'FILE *' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called
try.cpp(16) : error C2664: 'fprintf' : cannot convert parameter 1 from 'std::ost ream' to 'FILE *' No user-defined-conversion operator available that can perform this conv ersion, or the operator cannot be called
what is wrong?