15,552 Topics

Member Avatar for
Member Avatar for ddebevec

I have a client/server socket program example that I am modifying in order to pass a parameter to a called program on the server side. The problem that I’m encountering is trying to build a command line string that will execute the called program from a “system()” function. I’m testing …

0
40
Member Avatar for donelliewhyte

I am trying to try search a file for a record based on on a number is enter which is printed to a file under registratation number.I just want to know if my coding is correct.Below is a sample of the module. [CODE]{ struct custinfo info; FILE *customer; char number[5]; …

Member Avatar for WaltP
0
216
Member Avatar for donelliewhyte

Thanks for all the help so far but i am writing to a file numbers from as string and i am getting incorrect results.how may i correct this

Member Avatar for WaltP
0
76
Member Avatar for MohaideenShalim
Member Avatar for Agello

Hi there folks, I got some minor problem with this code: [CODE] #include <stdio.h> #include <stdlib.h> int main(){ char option, factor; printf("Choose your operator: \"+\" ; \"-\" ; \"*\" ; \"/\" \n>\t"); scanf(" %c", &option); printf("You chose : %c \nChoose your factor:\n>\t", option); scanf("%d", &factor); printf("You chose : %i\n",factor); printf(" …

Member Avatar for Agello
0
256
Member Avatar for dibbieshir

Can anyone tells me that strstr can use to search a record with typedef struct{}??? I was just asking... and if its true then can i know how?? im just a beginner with a great project from our instructor T_T,.,.,,..,.,

Member Avatar for Dave Sinkula
0
232
Member Avatar for kilon666

Here's the thing I want to compile this program in c using the GUI environment, but it isn't working out. I know that you can make a new project with windows32 GUI but it still isn't 'getting' the custom library. Am I missing something like linking the library somewhere else? …

Member Avatar for kilon666
0
201
Member Avatar for riahc3

Hey I wanted to know how to make a number pyramid with (for example) the following formation: (This would be for 5 rows, with 5 being a variable and as you can see in the last row the last number is 5 on each end) [IMG]http://img199.imageshack.us/img199/2239/numbers.png[/IMG] [url]http://img199.imageshack.us/img199/2239/numbers.png[/url] So far I …

Member Avatar for shah1248
0
108
Member Avatar for homesweethome17

I am currently working on a program that inputs a line from a file, then reads the vowels in the file, next I am going to count the number of letter a within the program. Below is the program I have done but it is not working. It opens the …

Member Avatar for MyrtleTurtle
0
147
Member Avatar for iNach

Hey, I have a problem. I want that when the user presses the ESC Key, my program will send him a message if he sure he wants to exit the program. [b]Basicaly what I need help with is how to do the "IF Esc is pressed"[/b] Thanks

Member Avatar for xavier666
0
8K
Member Avatar for xavier666

I just received the MERGE SORT code from my friend, here it is [CODE]void sort_merge (int *array, int low, int high) { int mid; if (low < high) { mid = (low + high) / 2; sort_merge (array, low, mid); sort_merge (array, mid + 1, high); array_merge (array, low, high, …

Member Avatar for xavier666
0
4K
Member Avatar for johndoe444

I am sick of segmentation faults. This is the last straw. How to tame this ferocious wild beast? For small programs it can be debugged. But when dealing with large programs such as implementing a b-tree with thousands of pointers it is a nightmare to pinpoint the location of segmentation …

Member Avatar for thomas_naveen
0
124
Member Avatar for johndoe444

Hi, If suppose we have a double pointer like char **a and for each a[i] we allocate some space also, then is it sufficient to free a only or we need to first delete each a[i] and then delete a? And if there are parent child relationship like a is …

Member Avatar for gerard4143
0
69
Member Avatar for prakashjoshi010

Hi, I would like to declare function with calling convention. But getting following errors on CentOS 4.7 with GCC 3.4.6 test.c:3: error: syntax error before "display" test.c:3: warning: data definition has no type or storage class test.c:12: error: conflicting types for 'display' test.c:3: error: previous declaration of 'display' was here …

Member Avatar for Dave Sinkula
0
130
Member Avatar for ala0003

I have been learning c++ and Allegro (graphics libary) for about a year, and have been trying to get this code to work (in particular, passing the array of classes), and when compiling i get the following errors C:\Documents and Settings\User\Desktop\npc.h In member function `void cNPC::NPCmove(cNPC*)': 96 C:\Documents and Settings\npc.h …

Member Avatar for ala0003
0
218
Member Avatar for tquiva

Hi could someone please help me with this problem. I want to find the greatest and least numbers of all current input numbers. My output is wrong. I can't seem to calculate the max/min of all the current input numbers. My code only find the max/min between two inputs. Here …

Member Avatar for tquiva
0
227
Member Avatar for katwalatapan

Hello, I have observed a data access misaligned address violation during the following data type casting. [code=c] #include <stdio.h> #include <stdlib.h> int main(void) { float mul[19013]; unsigned int ch_sz=76052, i; mul[0]=0; for(i=1; i<(ch_sz/4); i++) { mul[i]=mul[i-1]+(1/(float)(ch_sz/4)); printf("%f\t", mul[i]); } return 0; } [/code] Please help me isolate the issue and …

Member Avatar for Dave Sinkula
0
147
Member Avatar for mjee

I have written a program for the Game of Life in OpenMP with C. But the execution time is increasing with the number of threads. Can you please help me with where I am wrong? [CODE]#include<stdio.h> #include<stdlib.h> #include <malloc.h> #include <math.h> #include <sys/time.h> #include<omp.h> #define ALIVE 1 #define DEAD 0 …

0
124
Member Avatar for Xufyan

i want to write a program using "for" loop, that will generate the following output. value of a is 0, value of b is 2 value of a is 0, value of b is 4 value of a is 0, value of b is 6 value of a is 1, …

Member Avatar for WaltP
0
265
Member Avatar for Xufyan

Hello everyone i am new in C language and need some basic help. see this program, [CODE] void main(void) { int a,b; clrscr (); { for (a=1;a<5;a++) { for (b=2;b<6;b++) { printf ("value of a is %d , value of b is %d \n",a,b); b=a+1; a=a++; } } } getch(); …

Member Avatar for shah1248
0
293
Member Avatar for DCvonB

Hello, I am trying to create a doubly linked list that will print the entered input in the original order and then print it in the reverse order. Earlier I was able to get it to print the list twice, but the second time was not in the reverse order. …

Member Avatar for DCvonB
0
305
Member Avatar for tquiva

I am trying to find the value of a given base and exponent, with the exponent being an integer greater or equal to 0. However, I am getting strange numbers at output. Could someone please take a look at my code ? [CODE]/* File: driver3.c * Date: February 28, 2010 …

Member Avatar for anup375
0
105
Member Avatar for linkinmal

I'm writing a c code, we can include mqueue.h and write the function mq_open with the arguments, but it won't build. I know it's a problem with the linking, I need to add -l libname or something to the linker. But I don't know what to write there and how …

0
48
Member Avatar for prakashjoshi010

Hi, I have global and local variable with same name, and I would like to access global variable. But I am getting this error: "error: syntax error before ':' token" . I have GCC 3.4.6 on CentOS 4.7 #include <stdio.h> int amount=20; int main() { int amount=10; int k = …

Member Avatar for Ancient Dragon
0
92
Member Avatar for maria1110

I'm writing a library system and need to search for a book entered in the system to renew it. But my search refuses to work Code void search(){ // function to locate a record int barc; char search_aulname[28],search_aufname[28],search_stufname[28],search_stulname[28],searchbk_title[500]; char aulastname[28],aufirstname[28],stufirstname[28],stulastname[28],bktitle[500],date[120],genre[28]; FILE*fp; system("cls"); printf("*****************************************\n"); printf("ENTER AUTHOR LAST NAME OF ITEM:\n"); fgets(search_aulname,28,stdin); …

Member Avatar for Adak
-1
208
Member Avatar for hwlibra083

Can anyone tell me what this means and how to fix it? I keep getting this warning, the title of this post, and I'm not quite sure on how to fix it. It is messing up what I'm trying to do. Here's the code: [CODE]#include <stdio.h> #include <stdlib.h> #define MAXLINELEN …

Member Avatar for jonsca
0
217
Member Avatar for infrapt

hey guys i need some help with cell be programming.Pls msg me if u knw anything abt it

0
53
Member Avatar for shivnath

Hello Everyone I have just started studying about applications and usage of DBus and as I able to understand that it is possible to pass messages between two different applications(programs) written in different languages usnig DBus. But I am not able to implement it. So just for demo, I want …

Member Avatar for Ancient Dragon
0
134
Member Avatar for Unidennn

i have a question about the logic about the calendar question. I have to make a calendar, so user inputs a month (number 1-12) and a date, and the output is suppose to be: Friday, January 1, 2010. Suppose to be written in just simple c, no arrays or anything, …

Member Avatar for Unidennn
0
77
Member Avatar for MWE_QUE

This is homework, but I'm stumped on this problem. It prints store->storeId properly in "case 0", but storeId prints with the name added in the "printMall" function, i.e. "L01vacant" it then prints "vacant" for store->store name as it should and the rest of the printMall function prints properly. I've changed …

Member Avatar for MWE_QUE
0
125

The End.