thanx
Type: Posts; User: jerez_z
thanx
if I open a file that does not exist with mode r will the file pointer return as false? Example:
FILE *filePtr = fopen(".//file_does_not_exist.dat", "r");
if(!filePtr) {
printf("File...
alright makes sense, thats the way I thought it was anyway.....
that dosen't seem to work..... I need to send the varialbe that I created using malloc
/*I have looked thorugh the file copying threads and not one appears to work for me. I have a file I have written using random access (several different structs of different sizes and types) and I...
ok nvm it worked with "r+" thanks alot guys
ok no writing with "r+" is happening
hmmmmm I'm pretty sure you can read with "a+" but let me try "r+"...
I tried that (using fwrite with mode "a+")... it didn't apear to work
I have a file that requires updating..how do I delete a small part of the data in the file and then replace it with another chunk (of the same size)?
alright sweet. everything works good so far. Now how do I send this structure between functions?
ok thats cool.....
Is it possible to declare a global variable from within a function?? Thanx
but I need to open it in random access mode
ok another problem..... I'm having trouble writing the headers struct to a file:
fwrite(headers, sizeof(headers), 1, filePtr);
I've opened the file with "w+" for a mode. but when I write...
sweet that works awesome. Your my idol :P
I use TCLite (its the one I have at school) and here is the code I'm using:
struct colHeads headers[20]; //*headers = malloc( colNum * sizeof *headers );
FILE * filePtr;
for (count2...
I changed it to .c and I still get the same error.
struct colHeads *headers = malloc( colNum * sizeof *headers );
This gives me an error:
Cannot initialize 'colHeads near*' with 'void near*'
ok I think that makes sense
so are those the easiest ways? cause they are still pretty confusing
well thats cool, but maybe you could explain it just a little more?
How do I set the length of an array using a value from the user?
struct colHeads headers[colNum];
That dosen't work^.... Any ideas? Thanx.