Usually, any files created by your program are placed within the project folder structure of your program, unless you told it otherwise. Scan (look) your project folder structure for the files, and if they aren't there, look at your source code and see if you've specified a specific directory.
#include <iostream>
#include <fstream>
usingnamespace std;
using std::ifstream;
using std::ofstream;
using std::endl;
int main ()
{
ifstream instream;
ofstream outstream;
instream.open("infile.txt");
outstream.open("outfile.txt");
int first, second, thrid;
instream >> first >> second >> thrid;
outstream << "The Sum of the first 3\n"
<< "Numbers in infile.txt\n"
<< "is" << (first + second + thrid)
<< endl;
instream.close();
outstream.close();
return 0;
}
This is not Creating a Text file.. is it me or is it just Xcode. I just installed Xcode 4.. thinking it easy to create Project not like NetBean for Ubuntu.
Not quite right. signed char has a range of -127:128 and unsigned char has a range of 0:255. char is signed by default. Not only that, it's not even initialized, so it could by anything. Also, C-Style arrays require a constant expression that can be resolved at compile-time for its length. Consider this line for MAX_PATH:
#include <iostream>
#include <fstream>
usingnamespace std;
using std::ifstream;
using std::ofstream;
using std::endl;
int main ()
{
ifstream instream;
ofstream outstream;
instream.open("infile.txt");
outstream.open("outfile.txt");
int first, second, thrid;
instream >> first >> second >> thrid;
outstream << "The Sum of the first 3\n"
<< "Numbers in infile.txt\n"
<< "is" << (first + second + thrid)
<< endl;
instream.close();
outstream.close();
return 0;
}
This code is just a simple Create Text file and write into it.. but why isnt Xcode not Creating the txt file and if it is. its not in the Project folder.
Try running your program in release mode. Debug mode can cause some problems, such as the one you're experiencing.
ok in Xcode how do i do that ?
working directory (from where you executed the program) the text files are not going to that.. that is the problem i am having i am creating a link list Programing for a home Data Base, but the Text files are not creating to test this
i done up a simple program and still have the same problem. I am new to Xcode i normally use Net Bean but it a pain trying work with