| | |
File handling
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
•
•
void openfile(char *,FILE**)
what does double stars indicates
Didn't you understand what's a pointer?
Evidently this function returns FILE* pointer via this argument. What's a strange perversion...
Well, it has one advantage over a return value -- you have to pass in an address, whereas you could ignore a return value.
I don't think that's how I would write it, though.
I don't think that's how I would write it, though. dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
How many times a pointer operator can appear with pointer to pointer declaration.
Is there any limit imposed by ANSI?
C Syntax (Toggle Plain Text)
int a; int *p; int **q; int ***r; int ****s; .... p=&a; q=&p; r=&q; s=&r; ...
That's it:
(256 in C++)
•
•
•
•
5.2.4.1 Translation limits
1 The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits:
...
- 12 pointer, array, and function declarators (in any combinations) modifying an arithmetic, structure, union, or incomplete type in a declaration
...
Implementations should avoid imposing fixed translation limits whenever possible.
With VC++ 2008 Express, compiling a C program, I was able to compile
Interestingly, as a c++ program I was able to give it about 920 stars before the compiler crapped out -- then it was during the link stage, not the compile stage.
char*(500 stars) ptr = "Hello"; before the parser complained. And then the error message was "parser stack overflow, program too complex"Interestingly, as a c++ program I was able to give it about 920 stars before the compiler crapped out -- then it was during the link stage, not the compile stage.
Last edited by Ancient Dragon; Jun 9th, 2009 at 11:18 pm.
![]() |
Similar Threads
- making file handling using visual basic 6.0 (Visual Basic 4 / 5 / 6)
- File Handling. Implimentation problem. (C)
- please give me a simple file handling program (C)
- File Handling (C)
- C File handling - search within file without reading content? (C++)
Other Threads in the C Forum
- Previous Thread: Selection Sort for a Linked List (Using Double Pointers)
- Next Thread: size of a file
| Thread Tools | Search this Thread |
adobe ansi api array arrays asterisks binarysearch calculate centimeter char convert copyanyfile copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax directory dynamic fflush file fork forloop frequency getlasterror givemetehcodez graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators infiniteloop initialization interest kernel km linked linkedlist linux linuxsegmentationfault list lists locate logical_drives match matrix microsoft motherboard multi mysql number open opendocumentformat opensource owf pattern pdf performance pointer pointers posix power probleminc program programming pyramidusingturboccodes radix read recursion recv repetition research scanf scheduling scripting segmentationfault send sequential shape socketprograming stack standard string strings structures systemcall testautomation turboc unix user variable voidmain() wab win32api windows.h






