Hi,
Though I am not very sure of this, I think the use of "void" allows certain old C compilers to handle functions that do not take any arguments. For the new ones this is redundant.
Type: Posts; User: guy_in_2000
Hi,
Though I am not very sure of this, I think the use of "void" allows certain old C compilers to handle functions that do not take any arguments. For the new ones this is redundant.
Is using scanf in this way dangerous? I mean will it lead to some buffer overflow or somethin' like that?
Hi,
I think writing/using a small command-line parser would be of immense help. Coding in Lex & Yacc should get your job done in not much time. If you wish to write your own parsing code though,...
Right, but if the programmer wishes to have multiple copies of this struct then one has to have a malloc().
Hi,
Your code should look like this:
typedef struct {
char name[20];
int age;
} Info;
printf("%s\n", str1);
will print hello unless you pass str1 as a parameter to "insertstring()".
insertstring(str1, "there", 3);
Moreover, str1 should be created with enough space to...
If you are using *nix or its clones, "vi" might be editor you need. On the other hand, if you are using DOS/Win you can use Borland's IDE.
Hello all,
The big-wigs should excuse this ignorant soul, I thought one couldn't pass structures like this
void SomeFn( struct { int a;} b ) { //code }
I think I also made another...
Hello,
For problem 1,
You declared a function pointer cmp like this
int (*cmp)()
which means that this function takes no arguments and just returns an int. What you should be doing...