No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I am working on a program which would really become easier to write if I can use character variables as an index to an array.. for eg. if char_var is a character variable say initialized to 'a'(ascii decimal value = 97), then array1[char_var] should refer to array1[97] element. I wrote … |
|
I want to create a structure comprising of an integer and a pointer to it. However it doesnt seem to work and devC++ gives the following error [CODE]struct loha { int i; int *p = &i; ...7 } *pp; ...8[/CODE] Error : 7 I:\G\My CPP\structures.c [Warning] no semicolon at end … |
|
I am facing some problems trying to understand the difference in handling strings when they are declared as a char array and when they are declared with a pointer pointing to them. In the following code snippets, I have a few doubts. 1.While code 1 works correctly, code 2 crashes … |