15,551 Topics
| |
i am facing several problems.... first one is: how do i typedef a structure i've seen many ways to do it but im not quite sure which one is the right one. this is what i think how it goes (but dont know why it goes that way) [code=C] typedef … | |
Hi all! would like some help, hopefully someone can enlighten me. My program has for input a 2d array where the number of rows and columns is decided by the user. So in the code below, the matrix A is the input matrix and the matrix Q is the matrix … | |
Hey, I'm a high school student who is fairly programming and I was curious as to how to input a single character without entered an End of Data marker (e.g. newline character/Enter) [CODE] #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main () { char ch; switch (toupper(getchar())) { case 'A': … | |
hi i am at uni an i have a project in which i have to create a backgammon game can anyone give me a helping start on how i would go about creating the board states? thanks | |
Hi guys, I have a simple noob question for you. say we got a header file called test.h and it contains the following content: [ICODE] #define BOOL [/ICODE] and in my c file test.c I want to see whether BOOL is defined, can I use the if statement to test … | |
Hello everyone, Please help me in getting source code or algorithm for audio compression from .wav to mpeg format in C language? Thnaku | |
i wanna learn how to add and delete records in a car stock inventory without having to delete the contents of the file and save it back. but i don't know how to. This is my code: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <windows.h> #include <time.h> int … | |
I'm currently wrapping up an assignment for class and i've been able to figure out most of the curveballs the professor threw at me but i've hit this one and it just seems strange. It seems he's declared... a pointer that is also a function? [code] struct data_node { char … | |
My problem definition is ,I have to send a message from one node in a network and it has to be broadcasted to all other nodes in the network.The program what I have given below will be running in all the nodes in the network.The same program should be capable … | |
hi......i m doing kmeans clustering program for my final year college project. I need the source code in C. please helpme......its urgent. | |
Hi, I use char* for string handling because I read strings from a file and I don't know the length of these strings. The problem comes when I need to keep some strings in an array. I think char** is the best thing for that goal. But again since I … | |
Hi Guyz, There is two questions please help out in making program. Q)write a program using conditional operators to determine whether a year entered through the keyboard is a leap year or not. Q)write a program to print out all Armstrong numbers between 1 and 500.if sum af cubes of … | |
A huge huge thanks for all the assistance in my previous thread. It has me well on my way. The problem right now is I am trying to read input from a file using the '<' redirection. I however, am completely lost on how to do this. Searching google has … | |
I've come across an issue and for the life of me I can't figure it out. I need some serious help confirming if i'm thinking in the right way. But say I have 3 files. TableLayout.c Powers.c Powers.h Now TableLayout.c is a class that just takes a number from the … | |
Hi, i have som functions in a header file. But i get errors at compilation. [CODE]#include <stdio.h> //#include <limits.h> #include <math.h> #include <string.h> //define error codes enum { PERROR_FILEOPEN, PERROR_FILECLOSE }; //other defines #define P_LINELIMIT 512 //globally needed variables int P_Error = 0; char P_Line[P_LINELIMIT]; //typedefs typedef FILE P_File; //Error … | |
Hi, I did a project a while back and as the grading TA insist on it compiling on Solaris. I have a 0 for a perfectly working project. Can someone please help me with getting a program to compile on both the free free bsd and of course annoying Solaris. … | |
hey I am writing a program for a student management system. I need help with putting it in modules and placing functions in it. structures etc.... | |
Guyz i need an API for finding diff in time in minutes and days as fast as possible . if anybody has it and can provide me i wud be greatfull | |
Hi all! I'm trying to compile some code where I use a trylock, testing its return against EBUSY. The problem is that it won't compile because gcc says: error: ‘EBUSY’ undeclared (first use in this function) I'm using pthread.h and -lpthread when compiling. I also tried to unistall build-essential, update … | |
I have a program that will fetch some particular lines and store it in a buffer for further operations.The code which is given below works but with some errors.I couldn't trace out the error.Can anybody help on this plz?? [CODE]#include <stdio.h> #include <stdlib.h> #include<string.h> #define LINESIZE 256 void failif (int … | |
Hi all, I ve been given an assignment to be done in LINUX which requires filing for processes. I have studied about the functions to be used, [I]open, read, write[/I]. I have copied the example from the book in my text editor and it gives error when compiled. The input … | |
I have a program which will write informations like gid,gname,resname,restype,etc... in a file.I wrote a function to get the starting and ending position of a particular group.Stating of a particular group (say group 12)is denoted in a file by #gid12 and the end of the group is denoted by @gid12.I … | |
I am trying to read an integer in from the command line, but it keeps reading in the ascii value as the int, and it completely blows up when the number is greater than 9. I know it's probably trivial but can anyone be of assistance please int main(int argc, … | |
I have a file which contains data in this manner- 1, 20.6, 33, 45, 67 2, 58.9, 54, 644, 233 3, 67.2, 67, 345, 889 . . . . where the second column contains float data and the others are all integers. I need to read this file in my … | |
Hi. In [URL="http://www.daniweb.com/forums/thread183983.html"]my previous post[/URL] people said to me i need an array. I'm trying to insert things in an array and I get errors. [URL="http://labs.wasge.es/files.php?action=file&file=files/vass/devel/vass.c&format=yes"]This is the full code[/URL]. This is my piece of code (from line 77 to 85): [code=C] int buttons_add_audio_input[howmanyofeach]; int i = 0; while (i … | |
Plz tel me how to retrieve some specific set of lines from a file and store it in a char buffer.I am seperating each record by ":" [Code] 22:abc:4 hardware:cd:xyz:2 hardware:eth:abc:6 hardware:mouse:xyz:3 hardware:ram:xyz:1 23:cde:3 hardware:cd:xyz:2 hardware:eth:abc:6 hardware:ram:xyz:1 25:efg:2 hardware:cd:xyz:2 hardware:eth:abc:6 [/code] plz tel me how to retrieve [code] 23:cde:3 hardware:cd:xyz:2 … | |
I have a program which will write informations like gid,gname,resname,restype,etc... in a file.I wrote a function to get the starting and ending position of a particular group.Stating of a particular group (say group 12)is denoted in a file by #gid12 and the end of the group is denoted by @gid12.I … | |
Hi, I ve been given an assigenment in which I have to create a process, open a file and read it by that process, then that process the data to the another process (2nd process) through function pipe (), which capitalizes all the letters. The 2nd process then sends the … | |
Hello all, I'm a beginner in C, and I face the following problem. I have multiple data files, where in each file, there are 3 lines that are the same for each file, and then the fourth line in each file have the work "result" and then a value. What … | |
void x_bzero(s, n) void *s; unsigned int n; { long long *ptr = (long long *) s; unsigned int d; n /= sizeof(long long); d %= sizeof(long long); while (n--) *ptr++ = 0; } Dear programmers, hi I have a question about the function above. I'm calling that function from … |
The End.