Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

put function in cpp

char str[20] = "I love Grepper.";
int l = strlen(str);

ofstream file ("myfile.txt");

for(int i=0; i<l; i++)
{
  file.put(str[i]);
}
cout<< "process completed
";

file.close();
 
PREVIOUS NEXT
Tagged: #put #function #cpp
ADD COMMENT
Topic
Name
8+1 =