15,552 Topics

Member Avatar for
Member Avatar for Dewey1040

Im really confused, I had this recursive add function working but my teacher wants us to be able to use ++ instead of + 1... anyone know why im getting a segmentation fault on this, i feel like this is a really dumb mistake. [code=C] int add( int n, int …

Member Avatar for Dewey1040
0
70
Member Avatar for Alibeg

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 …

Member Avatar for Alibeg
0
285
Member Avatar for mj85

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 …

Member Avatar for jephthah
1
95
Member Avatar for Aelphaeis

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': …

Member Avatar for Aelphaeis
0
377
Member Avatar for ammonation42

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

Member Avatar for nucleon
0
102
Member Avatar for beanryu

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 …

Member Avatar for jephthah
0
122
Member Avatar for krutthika

Hello everyone, Please help me in getting source code or algorithm for audio compression from .wav to mpeg format in C language? Thnaku

Member Avatar for MosaicFuneral
0
40
Member Avatar for Kryptonitejugz

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 …

Member Avatar for jephthah
0
5K
Member Avatar for MaestroRage

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 …

Member Avatar for ArkM
0
90
Member Avatar for metal_butterfly

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 …

Member Avatar for jephthah
0
210
Member Avatar for amit_ciem

hi......i m doing kmeans clustering program for my final year college project. I need the source code in C. please helpme......its urgent.

Member Avatar for Ancient Dragon
0
84
Member Avatar for pdrino

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 …

Member Avatar for Aia
1
2K
Member Avatar for saramv

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 …

Member Avatar for ddanbe
0
129
Member Avatar for MaestroRage

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 …

Member Avatar for Aia
0
13K
Member Avatar for MaestroRage

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 …

Member Avatar for Ancient Dragon
0
9K
Member Avatar for VelcroMan

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 …

Member Avatar for ArkM
0
179
Member Avatar for drjay1627

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. …

Member Avatar for drjay1627
0
79
Member Avatar for realmckoy89

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....

Member Avatar for Ancient Dragon
0
135
Member Avatar for shirish_kal

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

Member Avatar for Ancient Dragon
0
113
Member Avatar for Guru Silva

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 …

Member Avatar for Guru Silva
0
505
Member Avatar for metal_butterfly

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 …

Member Avatar for metal_butterfly
0
90
Member Avatar for Samran

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 …

Member Avatar for Samran
0
162
Member Avatar for metal_butterfly

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 …

Member Avatar for metal_butterfly
0
107
Member Avatar for bobrien314

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, …

Member Avatar for bobrien314
0
82
Member Avatar for swetharvss

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 …

Member Avatar for jephthah
0
188
Member Avatar for wasge

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 …

Member Avatar for wasge
0
190
Member Avatar for metal_butterfly

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 …

Member Avatar for jephthah
0
145
Member Avatar for metal_butterfly

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 …

Member Avatar for jephthah
0
120
Member Avatar for Samran

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 …

Member Avatar for Samran
0
284
Member Avatar for amegahed3

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 …

Member Avatar for jephthah
0
269

The End.