well maybe u can define ; as a other name then use other name as derived type
MrNoob 24 Posting Whiz in Training
well maybe u can define ; as a other name then use other name as derived type
c doesn't have call by refrence since the value if it's not a ptr it won't change only it's copy will in the function if u want it to change u need to pass the address
lol srsly thats soo stupid thats y most professional programmers arent from college there self taught lol
and btw arrow operator is ptr to structure -> they should tell you basics before you should even tell you to translate program to english
you should read the documents abt realloc before you do it right away
you can also do something like
while(!answer())
reget user choice
//then when its out of the loop
puts("welcome to the treasure of centries ");
if you know about functions ofcourse
and if you dont then you could just just do scanf inside loop and keep scanning till while(strcmp(Name1,Name)) you cant compare char * by just relational operators
you can also use strncmp or use strchr to remove new line after each time fgets reads the string
i think something like this would work
for(int n=0;n<=sizeof SzStrings/SzStrings[0];n++)
{
Putrand(append_test_data);
if(strcmp(append_test_data, SzStrings[n]) == 0)
{
printf("Append data is =%s\n",append_test_data);
printf("constraint is found=%s\n", SzStrings[n]);
getch();
return 0;
}
}
its "a1,b1,c1".
i use const_array as double array so that everytime i just query the row,not the column.
and append_test _data is just a string array.
do u meant with this declaration :
char append_test_data [MAX_LENGTH]="";
i use "" in this array.does it effect?
normally append_test_data[MAX_LENGTH]="";
is just \0 stored in it do you want to make user each time get string from him through the loop and then compare it ? also note that int n=1 that will start from 2nd array count not first since arrays start from 0 could you also post full code to see whats wrong with it
also arrays starts at 0 count not 1
if its multi dimensional array then u have to keep track of the counts ur comparing like for example
for(i=0;i<MAX;i++) //this is a case in which string have same count
if(!strcmp(SzString,SzString2)) { //do stuff};
why dont u use fgetc and put str[c]=c; ?