where is main()? And you should add
#include <stdlib.h>
since you are using the malloc() function.
Type: Posts; User: lvl99
where is main()? And you should add
#include <stdlib.h>
since you are using the malloc() function.
I'll try and help , but post the exact and complete code that you are using to get that particular error.
I'm not sure if I'm really helping but this is how I would solve it. I tried to simplify it.
#include <stdio.h>
#include <string.h>
struct employee{
char fullname[30];
float...
I think that you should declare: d, root1,root2 as variable type double for more accuracy. Also, the function sqrt() returns a variable type of double.
Can you omit getchar () from the program? It doesn't seem to affect the program. If someone else could weigh in that would be great.
Thanks ,hk_mp5kpdw, I'll make those changes.
Thanks that did the trick.
it's the latter.
#include <stdio.h>
#include <ctype.h>
#define ArraySize 40
int ReadDataFromFile(int FileData[ArraySize]);
oh sorry it should be just one character, it's one character per line.
1
2
3
6
6
I made the change but still, my output is still the same.
OK, I have a text file that has "1,2,3 d, e, 6,6, h,h, ...etc" I want to put all the digits into an array for analysis. So the array size known. I am able to open the file and filter the desired...
Thanks for the feedback guys.
I'll probably do that.
Well, eventually I would like to write a program that can do matrix math, like finding the transpose, inverse and stuff like that. ...
This my attempt at creating a dynamic 2d array. I am able to store the values into the array and read them out. Is there a more elegant way of inputing the values?
array[(i*4)+j]=count++;
...
um..I'm still learning c, but here was my attempt at it. It isn't a complete program but, It should solve the randomizing issue. You should modify the code as you see fit.
#include <stdio.h>...
I'm not sure what you mean by in a 'row'. Since you said string could you solve it like this?
#include <stdio.h>
int main(void)
{
int index;
char input[40];
What is your program suppose to do? Can you describe it better?