ic what you mean but if the names aren't the same
like one only have 10 chars and another 12 chars
so i should put the max chars allowed or should i use sizeof(pChar[i].name)?
Type: Posts; User: pcshano
ic what you mean but if the names aren't the same
like one only have 10 chars and another 12 chars
so i should put the max chars allowed or should i use sizeof(pChar[i].name)?
what do you mean by that?
because i declared in my structure it's just char *name; so shouldn't it be just (char*)?
so i have a text file that goes like
using fgets in a loop to read line by line and then put each variable into a structure type using sscanf
my structure type is
typedef struct
{
...
k so my program is first you prompt the user to ask them for a file to open (choose 1 from many text files) using gets and store it in filename (let's say the file i want to open is file.txt)
then...
let's say i have a string "file.txt"
and i want to insert "_out" to make it look like "file_out.txt"
i don't know how to do this D:
i figured out what my problem is but i can't figure out the way to fix it
the problem is in my code, instead of sorting in descending from row with the most elements to the row with the least...
you initialize them from another function which i called it buildTable
int** buildTable (int* nrows){
int rowNum;
int colNum;
int** table;
int row;
printf("Enter the...
i just put those numbers up there as example
what i need to sort are the rows
let's say i have a 2D array with 3 rows and each row with different number of elements
row 1: 8 elements
row 2: 3...
I need help with selection sorting a 2D array
let's say i have an array like
1 2 3 4 //4 elements
1 2 // 2 elements
1 2 3 4 5 //5 elements
1 2 3 //3 elements
1 //1 element
and...