CC> 'Note this is Qbasic code and i see it in c++
Bearing in mind that you said "C++", not "C" (they aren't the same language):
#include // Note that the headers in Standard C++
#include // are not the same as these. But most
#include // implementations have yet to catch up.
int
main ( int, char ** )
{
char name[80] ;
cin.getline(name, sizeof name) ; // Note: no EOF checking
if (!strcmp(name, "Cyber Con")) {
cout << "Hello " << name << endl ;
ofstream file("file1.fil", ios::out|ios::trunc) ;
file << name << endl ;
}
return 0 ;
}
Incidentally, as far as I am aware it is against the echo rules to use
aliases in this echo. If I were you I'd turn them off and use your real name
before the moderator spots you.
¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)
|