Okay, I understand now. Thanks.
Type: Posts; User: Metalix
Okay, I understand now. Thanks.
I understand. But what about the function prototype?
Thanks, there were some obvious problems there - most shamefull, thanks for pointing them out.
But I don't understand why I would pass the file pointer as a non-pointer. Why?
I see. Should I pass is as so:
write (**OutfilePtr, Chargroup);
And take away the const declaration in the prototype?
Of course. I'm sorry.
I've pinpointed the problem to the write functions. The compiler says there's a parse error on lines with Chargroup or filepntr.
Hi, I'm having another episode with function parameters, but I've included the source files.
Thanks for your help.
/* Write - This module writes an array of 60 converted characters into */...
I've always kept my function bodies in .h files and included them as modules in my main.c file. I understand this is bad practise. Do I declare the function prototype in the header file, and then use...
So, is it good practise to prototype your functions in header files? I've gotten away with it enough.
a.h:
void function();
a.c
void function(int *parameter)
{
What's the difference between a .c file and a .h file? I though .h was just for modules, but I hear people calling it header files. Also, everyone seems to have .h .c files for each module.
What's...
Thanks alot for your answers!
That's cool, but I wanted to invert the letters. Ie. A becomes Z, b becomes y.
You know what I mean?
Hi,
I want to invert some ASCII characters, ie, A becomes Z, z becomes A, etc.
Would anyone be able to point me to a simple ASCII chart or give me some suggestions?
Thanks,
Lewis
I see, that's a good point. I actually thought that EOF was a special character, but I see it's a macro.
Thanks again.
Yeah, cheers mate, that did the trick.
Ah, it's amazing, a few weeks ago I thought I knew it all with C, but these dynamic parameters are a totally new challenge for me, and yet again, it's the...
I haven't tried it yet (on another machine), but I think you've hit it spot on.
Thanks!
It doesn't seem to answer my questions. See, I can't see what I'm doing wrong. I passed the parameter as a pointer to a pointer, I gave the function the address, why would it be giving me an...
Thanks for the help. The functions for opening my files now run as sweet as a nut! :D
I've encountered a similar problem though. When I try to use a double pointer for a function that reads the...
So, in theory it's used as:
int Variable;
int *Pntr;
int **Pntr2Pntr;
Pntr = &Variable;
Pntr2Pnr = &Pntr;
Okay, thanks alot.
I know this sound's very stupid, but I'm not quite aware what two stars mean. Is that a pointer to a pointer? or what?
Thanks.
Hey,
I'm trying to pass some file pointers as function parameters but I'm having a little trouble with it.
Say, I pass the pointer to a function to open my file:
openF(&FilePntr, argv);
...