This is driving me crazy, I have the following program:
Which should just create a file text.txt and put there the string:Code:#include <iostream> #include <fstream> #include <cstdlib> using namespace std; int main() { ofstream myfile; myfile.open("text.txt"); for(int i = 1; i < 9; i++) for(int j = 1; j < 9; j++) { myfile << "x" << i << j << " + "; } myfile.close(); }
x11 + x12 + .... + x88
What is actually outputs is:
If I remove " + " it outputs the actual string without pluses, otherwise it outputs crap. Why?Code:ㅸ‱ㅸ′ㅸ″ㅸ‴ㅸ‵ㅸ‶ㅸ‷ㅸ‸㉸‱㉸′㉸″㉸‴㉸‵㉸‶㉸‷㉸‸㍸‱㍸′㍸″㍸‴㍸‵㍸‶㍸‷㍸‸㑸‱㑸′㑸″㑸‴㑸‵㑸‶㑸‷㑸‸㕸‱㕸′㕸″㕸‴㕸‵㕸‶㕸‷㕸‸㙸‱㙸′㙸″㙸‴㙸‵㙸‶㙸‷㙸‸㝸‱㝸′㝸″㝸‴㝸‵㝸‶㝸‷㝸‸㡸‱㡸′㡸″㡸‴㡸‵㡸‶㡸‷㡸‸