Problem Statement - File and string related header files
The following C++ code during compilation reports errors as follows:
Error: ‘ofstream’ not declared
Error: ‘strupr’ not declared
Error: ‘strcat’ not declared
Error: ‘FIN’ not declared
Write the names of the correct header files, which must be included to compile the code successfully:
void main() { ofstream FIN("WISH.TXT"); char TEXT2[]="good day"; char TEXT1[]="John!"; strupr(TEXT2); strcat(TEXT1, TEXT2); FIN<<TEXT1<<endl; }
Solution
CSKC| Created: 3-Dec-2018 | Updated: 14-Sep-2019|CBSE12A-2018