| | |
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
Views: 877 | Replies: 14
| Thread Tools | Search this Thread |
Tag cloud for C
#include * .net append array arrays asterisks binarysearch calculate changingto char character cm command copyimagefile cprogramme creafecopyofanytypeoffileinc database directory dynamic execv feet fgets file fork forloop framework function functions givemetehcodez grade graphics gtkwinlinux hacking histogram homework include incrementoperators input intmain() iso kernel keyboard km lazy license linked linkedlist linux list lists locate logical_drives looping loopinsideloop. lowest matrix microsoft mqqueue mysql number oddnumber odf opensource overwrite owf pdf performance pointer pointers posix probleminc process program programming radix recursion recv recvblocked research reversing scanf scripting segmentationfault sequential socket spoonfeeding standard string student systemcall testing threads turboc unix user variable wab whythiscodecausesegmentationfault windowsapi






