I want the user to be able to type some text and then the computer creates a file called what ever the text was. In C++.
+1
A:
Because this looks like homework, I'm not giving a complete example.
Look in:
#include <iostream>(Preferred) or#include <cstdio>(Legacy)
Billy ONeal
2010-08-06 19:28:14
+3
A:
#include <cstdlib>
int main() {
return system("read FILE && touch \"$FILE\"");
}
Note: Requires POSIX. Should be OK, practically all modern OSes are POSIX-compatible.
John Kugelman
2010-08-06 19:35:13
+1, does satisfy user requirements
aaa
2010-08-06 19:40:04
haha, clever :-)
nebukadnezzar
2010-08-08 02:06:57