You should get at least a warning that atof() isn't declared properly in numcmp.c.
And this also looks strange:
//numcmp.c
void substr(char *s, char *t, int maxstr);
...
//substr.c
void...
Type: Posts; User: AndiPersti
You should get at least a warning that atof() isn't declared properly in numcmp.c.
And this also looks strange:
//numcmp.c
void substr(char *s, char *t, int maxstr);
...
//substr.c
void...
I don't understand what your program does and the fact that all your names and comments are in Spanish doesn't make it easier.
Nevertheless I just run it and it segfaults. Here's the debugging...
answer =(digit_sum , + num) / 9;
What are you trying to achieve with this line?
if ( num % 9 >= 0)
This expression will always be true. % 9 returns the remainder of the division by 9...
Well, you have a contradiction here.
Either you know where "endText" should end or it is impossible to append a '\0'.
If you tell us what you want to achieve, perhaps someone will find a good...
No, that line is syntactically correct. %[ is a legal format specifier. See scanf, fscanf, sscanf - cppreference.com.
Bye, Andreas
If I compile your program from post #5 I get the following warnings:
$ gcc -Wall -Wextra -ggdb3 foo.c -lm
foo.c: In function ‘fun’:
foo.c:73:19: warning: unused parameter ‘x0’...
The question is about the number of elements you can store in that array.
So, how many elements are in the first dimension (-1...m)?
How many elements are in the second dimension (1...m)?
If...
You should know which programming language the question is about. From where did you copied it?
I would say it's pseudocode and thus a general question.
Do the calculation yourself then come...
In case you haven't found out yet, gcc uses command line switches to turn on warnings. I usually use -Wall and -Wextra but there are lot more. See Warning Options - Using the GNU Compiler Collection...
while(str[i++]!='\0');
When str[i] == '\0' you are still incrementing "i".
You need to increment "i" in the body if you don't want to count the '\0'.
rev[++j]=str[--i];
You...
printf("The third letter is : %s \n",str[3]);
This will print the fourth letter (after changing %s to %c of course). Remember array indexing starts at 0.
Bye, Andreas
And to answer your other question: No there is no <- operator in C.
Bye, Andreas
You should already have mingw32-make on your system.
So just use it instead of make (which is the MS make).
Bye, Andreas
int isNotSpecificOrder(Order ** iter){
Order * tmp = *iter;
while (tmp->isSpecific && tmp != NULL)
tmp = tmp->next;
Suppose "tmp" points to the last node and "tmp->isSpecific" is true. Now...
I guess the assignment's purpose was to practice the switch statement ;-).
Bye, Andreas
I'm afraid you rely too much on our help to debug/write your program.
Just try it out yourself. Call your function with system->driversQueue being empty and see what happens (Hint: migf1 told you...
//for lines larger or equal than the size limit....
if (orig >= (PARSE_SIZE_LIMIT - 1))
{
for (x = 0; x <= (PARSE_SIZE_LIMIT - 1); x++)
{ subject[x] = userstring[x]; }
}
//for...
link *printList(link *current);
link *populateList(link *current);
Both functions don't return a link pointer.
link *searchList(int value, link *head) {
struct node *temp;
...
Don't store the labels for the axes in the grid array. You only need them when you display the grid on the screen. If you do like Nominal Animal suggested (putting a '\0' at the end of each row) you...
I personally wouldn't store the labels in the grid array. IMHO this makes the code unnecessarily more complex.
Animal Nominal told you already that the method is the same as using pen and graph...
Well, "temp" is a pointer thus sizeof(temp) will probably be 4 or 8 (depending on your system), i.e. not enough. You need to calculate the total amount of bytes you want to copy.
How many bytes is...
void text_test3( char *array)
{
char char_array[5];
strcpy( char_array, array );
printf("%s\n",char_array);
}
char_array[5] will be too small if the OP wants to call...
if (k = 3) {
What does the = operator do?
Bye, Andreas
It's probably too late, but the next time you should post your code here in the forum instead of putting it somewhere to download.
Additionally, you should only post the part you have problems...
That's a pretty useless error description. How is it not printing correctly?
while(fread(&number,sizeof(int),1,f) == 1){
if((x%2) == 0 || (x == 0)) {
...