Here is a sample code
When I compile this code, although it compiles correctly, xCode gives me a message at the start of the executable file "warning: this program uses gets(), which is unsafe.". Why? Although I can run the program flawlessly, that warning bothers me, because don't know if this command will cause problems when I try to write other programs.
Oh, and how can I create a box that contains code in this forums? (you know, just like the box of a quote, but with code).
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
int t, i;
char text[100][80];
for (t=0; t<100; t++){
cout << t << "; ";
gets(text[t]);
if(!text[t][0]) break;
}
for (i=0; i<t; i++)
cout << text << '\n';
return 0;
}
When I compile this code, although it compiles correctly, xCode gives me a message at the start of the executable file "warning: this program uses gets(), which is unsafe.". Why? Although I can run the program flawlessly, that warning bothers me, because don't know if this command will cause problems when I try to write other programs.
Oh, and how can I create a box that contains code in this forums? (you know, just like the box of a quote, but with code).