-
Created c programming struct question
I was looking at this struct tutorial. https://www.tutorialspoint.com/cprogramming/c_structures.htm It mentions "The structure tag is optional". How would you refer to your struct if there is no structure tag? struct { … -
Created c programming description
How would you describe c programming to a person that does not know anything about computers? -
Created gcc find header files in current directories
I sometimes move my code around to various computers so I prefer to keep my header files in my current directory. Unfortunately it does not seem to be working. $ … -
Created Replacing a string in a function with double pointers
I am trying to replace a string in a function with double pointers. I would like to see this change back in main. What am I doing wrong? These are … -
Created c programing holding window open
I am doing a team project with some people that prefer Linux and some people prefer Windows. We are also not allowed to share code for security reasons. One thing … -
Replied To a Post in Fixing a mistake with function calls
How do you make a variable global to a scope? I only know about global variables to an entire program where you put it at the top of the program … -
Created Fixing a mistake with function calls
I have 30 functions like this void func1(int *var1, int *var2) { func2(var1, var2); } void func2(int *var1, int *var2) { func3(var1, var2); } void func3(int *var1, int *var2) { … -
Created global variable vs pointer counter with multiple functions
If you have a counter that gets incremented through multiple functions, is it better to use a global counter or pointer counter? They both work just curious which is better … -
Created use % in printf statement
I am trying to a % in a printf statement represent 10%. How do I do that? My compiler warnings are complaining about it. I tried a backslash but that … -
Replied To a Post in remove values from an array of strings
What method would code police like? I can't think of any other way to do this but one of these methods. The wall warning of gcc doesn't like the third … -
Replied To a Post in remove values from an array of strings
Which method do you usually use? buffer[0][0] = '\0'; memset(buffer,0,strlen(buffer[0])); memset(buffer,0,sizeof(buffer[0])); -
Replied To a Post in remove values from an array of strings
I am the master of segmentation faults when doing linked lists so I don't really like this option. Setting to null sounds easy :). I only have an array of … -
Created remove values from an array of strings
Whats the best way to removes values from array of strings? Is it better to create a new array of strings or is there some way to remove them? -
Replied To a Post in Order matters with if else if statement
This is C programming not PHP. -
Replied To a Post in Order matters with if else if statement
Like this? if(!(row1 = mysql_fetch_row(result1)) && (adding_to_member_flag != 1)) { } -
Created Order matters with if else if statement
Why does order matter with this if else if statement? if((row1 = mysql_fetch_row(result1)) && adding_to_member_flag != 1) { printf("Do not update date since it already exists\n"); } else if(!(row1 = … -
Replied To a Post in sql update record to null
"is" instead of "=". -
Created sql update record to null
I am trying to set a record back to null. I was able to change it from null and now I want to change it back to null. For some … -
Created print data in columns
I am trying to print my data in columns. For some reason every column but the last one lines up. Is there a way to fix this? while ((row = … -
Replied To a Post in while multiple condition help
I want the loop to continue until sscanf_count equals 2 or the user hits ctrl + D. -
Edited while multiple condition help
My second while condition is being ignored and I don't understand why. I would think I have 1 and 0 = 0 so it would break out. while(fgets(line, sizeof line, … -
Created while multiple condition help
My second while condition is being ignored and I don't understand why. I would think I have 1 and 0 = 0 so it would break out. while(fgets(line, sizeof line, … -
Created printf with question mark and NULL
What does this printf do? Not familiar with the question mark, colon, and extra NULL at the end. printf("%s ", row[i] ? row[i] : "NULL"); -
Replied To a Post in c programming stop reading from stdin
I thought newline is equivalent to hitting enter on the keyboard. Is that correct? With this while loop it does not stop when I hit enter. I have to hit … -
Created c programming stop reading from stdin
When using fgets to read from stdin how do you stop reading from stdin? -
Replied To a Post in Split a big if statement across multiple lines
Can you please explain why? -
Replied To a Post in reading a csv file with multiple types
Can you tell me what I did wrong here then? https://ideone.com/RylYp1 #include <stdio.h> #include <stdlib.h> #include <string.h> /* * Given a string which might contain unescaped newlines, split it up … -
Created reading a csv file with multiple types
This is what I came up with for reading a csv file with multiple types. It seems to get the job done in all cases but 1,2,,"a". Where there is … -
Created Split a big if statement across multiple lines
How would I split this big if statement across multiple lines? It works perfectly on one line. if (mysql_query(con, "CREATE TABLE Matches(match_id INT UNSIGNED PRIMARY KEY, date DATETIME NOT NULL, … -
Created undefined reference to `mysql_get_client_info'
I keep getting this message. undefined reference to `mysql_get_client_info' From what I can figure out when I google it I am not linking correctly. So I tried this. gcc *.c … -
Replied To a Post in c programming mysql
I'm not using Ubuntu. I'm using Windows. Those are deb packages which are for Ubuntu. -
Replied To a Post in c programming mysql
How do you download them? I only see a list of files. -
Replied To a Post in c programming mysql
I'm using windows so I installed Pelles like it suggested. -
Created c programming mysql
Are there any good tutorials c programming with mysql? I only found one promising link, unfortunately they neglect to to show what is in their header files which doesn't help … -
Created Print an array of strings and ignore nulls
I have four array of strings. I would like to print out the strings with this formatting: printf(" %d \t %s \t %s \t %s \t %s.\n", quadruples_line_counter, strings_quadruples1_action[0], strings_quadruples2_variable1[0], … -
Replied To a Post in remove characters of a char array
Since there is no edit button I'm updating my code here. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> int main(int argc, char *argv[]) { char str [] = "xa_55_y_*_z_/_+_x_+"; … -
Edited remove characters of a char array
In the str char array below I would first like to locate the first math symbol I see, then I would like to count backwards and remove whatever is between … -
Created remove characters of a char array
In the str char array below I would first like to locate the first math symbol I see, then I would like to count backwards and remove whatever is between … -
Created How does this compile
How does this compile? I forgot to set my second condition in my second for loop and it compiles. if(cmp_str5 == 0 || cmp_str6 == 0) { if(cmp_str5 == 0 … -
Created adding an int to a Multi-dimensional char Array
I am trying to add an int to a Multi-dimensional char Array. After reading the link below I would think I can use sprintf. If I can't use sprintf what … -
Edited table
How would I go about making this table? ID Type Value X int 4 Y int 4 Z float 0 This is the only way I can think of but … -
Created table
How would I go about making this table? ID Type Value X int 4 Y int 4 Z float 0 This is the only way I can think of but … -
Created gcc vs code blocks with itoa
My understanding of code blocks is that it uses gcc. So I am curious why gcc allows you to have a function called itoa, but code blocks does not let … -
Created while multiple condition help
I always get confused with while when I need to use multiple condition. I believe this is correct. 1 and 1 = 1 1 and 0 = 0 1 or … -
Created getting the first value of a null initialized array of strings
I am trying to get the first value of a null initialed array of string.I have tried every method I can think of with no luck. I either get warning, … -
Edited ul with malloc
In this example in the malloc() what does the UL do? #include <stdio.h> /* perror */ #include <errno.h> /* errno */ #include <stdlib.h> /* malloc, free, exit */ int main(void) … -
Created ul with malloc
In this example in the malloc() what does the UL do? #include <stdio.h> /* perror */ #include <errno.h> /* errno */ #include <stdlib.h> /* malloc, free, exit */ int main(void) … -
Created malloc error checking methods
I have seen a few different ways of doing malloc error checking? Is one way better than the other? Are some exit codes better than others? Is using fprintf with … -
Replied To a Post in printing char*
http://ideone.com/bPZfCc -
Edited printing char*
Is this the correct way to print char*? *I know c has the value I want because of the print statement below it. The o is not giving the value …
The End.