Couple Of Questions I'm Absolutly Stuck On
Hey,
ok lets start with the one your going to find dead easy.
i am trying to assign a string to this char array over multiple lines however I cannot work out the syntax
Code:
char buffer[500];
buffer = "\n |-------------------------------------------------------|
_ \n | Algorithem | Time | Comparisons | Swaps |
_ \n |-------------------------------------------------------|";
2nd question is redarding file access....
I am trying to create a new text file for logging purposes each time the program runs. So i thought the time would be a nice almost unique filename to have.....again cannot get it to go. Here is the code I have so far.
Code:
out=fopen(asctime(time(NULL)) + ".txt","w");
I'm guessing both are just me not access the char arrays (strings) propperly.
Thanks for your help in advance.
Chris