15,551 Topics

Member Avatar for
Member Avatar for konata_89

//help me i dont know what wrong with list function [code] #include <stdio.h> #define MAX 10 struct book{ char title[81]; char author[71]; char category[31]; }; int main() { struct book library[MAX]; int menu(void); struct book add(void); int list(struct book,int); int choice, count = 0; do { choice = menu(); switch( …

Member Avatar for konata_89
0
126
Member Avatar for vincenzorm117

Okay I've been working with printf for a while on C and I have been trying to use some of the backslash commands such as: \b = backspace \r = moves the cursor to the beginning of the line For some reason they don't seem to work on xCode. 1. …

Member Avatar for nezachem
0
99
Member Avatar for cyberguy007

[CODE]# include <stdio.h> # include <stdlib.h> # include <string.h> # include <conio.h> typedef struct{ int a[99]; }number; const int max = 99; int main () { number array; int j; int count = 0; for ( j= 1; j <=max; j++ ){ count = count +1 ; array.a[j] = count; …

Member Avatar for Dave Sinkula
0
73
Member Avatar for frank_hugo_1100

i have a problem with using the parallel port to output signal to control devices or to receive data . i know that winxp restrict access to the port, so i downloaded the inpout32.dll and i put it in the system32 folder then i used the inport ,outport functions but …

Member Avatar for frank_hugo_1100
0
148
Member Avatar for its_yogy

[code] // This is My Client TCP program in C++ // Program Name client.cpp #include <winsock2.h> #include <iostream.h> #include <windows.h> #include <iomanip> char szServerIPAddr[ 20 ] = "192.168.5.251" ; // IP address of my Server int nServerPort = 5000 ; // The server port that will be used by clients …

Member Avatar for WaltP
0
300
Member Avatar for tefatany

[code]struct Node { int data; Node* Next; }; void mergelists(Node*&A, Node*&B , Node*&C) { Node *s=A; while(s!=NULL) { s=s->Next; } C=A; A=NULL; B=NULL; [/code] }(i have a missing but i don't know where)

Member Avatar for WaltP
-1
23
Member Avatar for Pugee

[CODE]//Converter //Thursday 25 2010 7:16pm #include <stdio.h> #include <stdlib.h> int main () { int i; char buffer [33]; printf ("Enter a number: "); scanf ("%d",&i); itoa (i,buffer,10); printf ("decimal: %s\n",buffer); itoa (i,buffer,2); printf ("binary: %s\n",buffer); system("pause"); return 0; }[/CODE]

Member Avatar for WaltP
0
106
Member Avatar for krishh

hello sir/mam turbo c still is not opening with dos. now what should i do? plz reply me as possible as soon.

Member Avatar for Salem
-1
83
Member Avatar for smbee

I have written a program for the famous game of life problem. The program is running perfectly for the sequential version. Now I am trying to implement it in parallel with MPI. I am just sending the main function where I am calling two functions. Calculate is updating the array …

Member Avatar for smbee
-1
280
Member Avatar for veronica_0501

I have to count characters, words and lines from a text file. I am able to count characters and lines but not words. This code is error-less, but the output for words always appear 0. Anyone able to help me see what's wrong and provide a way out? And I …

Member Avatar for gerard4143
0
137
Member Avatar for gplkrsna

Hi, Problem: I have two libraries with two different queue implementations. but with same structure name as "queuetype". Now if I include both of the header files in my code, compilation will go for toss saying "error: conflicting types for 'queuetype' " I need to include both the files. How …

Member Avatar for Narue
0
121
Member Avatar for kohkohkoh

can i know how to save a file name based on the user's input for example: Enter your name : Derrick then i save this input to a file .txt named derrick (derrick.txt) how can i do it? i only know how to use the rename() and delete() function...in the …

Member Avatar for DoEds
0
124
Member Avatar for Sobakaa

Hello everybody! I've wrote a very simple echo server, based on a book about LInux socket programming example and it works just fine. My only problem is that i want to use select() function to handle several connections at one time. I've read lots of reference concerning that function and …

Member Avatar for Sobakaa
0
233
Member Avatar for dhanyakumar

Dear sir, I want information about c of c++ I want design the prgm to DISPLAY and SPEAK... The sentences..... when i run the prgm to DISPLAY that sentences and SPEAK that sentences... plz give me....

0
46
Member Avatar for traced

cant understand much this is the code [CODE] { char *tok, *str; str = calloc (50, sizeof(char)); tok = strtok(str1, " "); while(tok) { if(strcmp(tok,str2)!=0) { strcat(str, tok); strcat(str, " "); } tok = strtok(NULL, " "); } strcpy(str1, str); return str; } [/CODE] what is the function of while(tok) …

Member Avatar for Salem
0
83
Member Avatar for spursfan2110

Hey everyone, I have a kind of large problem. I am trying to input something in C, a number between 0 and 50,000, using scanf(). I understand how scanf generally works, and it does for the most part, but for some reason if the number I enter is greater than …

Member Avatar for Dave Sinkula
0
181
Member Avatar for johndoe444

[CODE]typedef struct _node btree_node; struct _node { int* keys; btree_node* children; int count_keys; int is_leaf; btree_node* parent; int position_in_parent; }; [/CODE] I am getting this error: [CODE]error: no match for ‘operator=’ in ‘*(node->_node::children + ((long unsigned int)(((long unsigned int)(i + degree)) * 40ul))) = 0l’ note: candidates are: _node& _node::operator=(const …

Member Avatar for gerard4143
0
244
Member Avatar for royal33

I need to implement Dijikstra's and Floyds algorithm using a linked list !!! can anyone give a code on how to do it !! because i know to implement it using Matrix but am not familiar with the linked list !! please help me on this !!! The rules of …

Member Avatar for abhimanipal
0
88
Member Avatar for Notme

Hi, currently im working on a project for uni but i have no knowledge in C at all basically what im trying to do is remove all * !"£$%^&*()- and double spaces from a text file so far i am able to copy the text file so that im not …

Member Avatar for Dave Sinkula
0
1K
Member Avatar for newcuser

I really want to write this program in c without c++ coding. Please help me convert my code to c only. Here is sample input from a text file: alex busted marries marries test teste tested smile smiled works worked indexed hello kkked holddd smexexed whitespaced and Here is output …

Member Avatar for WaltP
0
169
Member Avatar for EvilNerd

I made a simple program where a user can pick from the menu. My problem is where do i put this code properly inside the fuction of [B]funcFloat[/B] and [B]funcInteger[/B] [CODE]if (myFloat < 0) // this will output if the user entered a negative value { printf ("You entered a …

Member Avatar for EvilNerd
0
91
Member Avatar for Gonbe

Hello Daniweb, I've ran against an issue in my code and i'm not sure why I receive an error. I've managed to reproduce the error with the following code: [CODE="C"] #ifdef _WIN32 #define PERFORMANCE_METING #endif #ifdef PERFORMANCE_METING #include <windows.h> #endif #include <stdio.h> #include <stdlib.h> typedef enum { FALSE, TRUE } …

Member Avatar for Ancient Dragon
0
150
Member Avatar for Encrypted

I'm not sure if I'm not comparing the strings properly or not, but for some reason my toppingCost function will only return 0 or a huge wacky number (when I mess around with the code a bit). Does anyone see anything wrong with this? [CODE] // represent the cost of …

Member Avatar for Dave Sinkula
0
134
Member Avatar for dista

I have to return a char * from a routine which has a char[] This should be simple but sometimes str1 results in garbage [code] char* foo (int ch) { char str[10]; char* str1; if (foo1(str,ch)) { str1 = str; } else { str1 ="???" } return(str1); } boolean foo1(char …

Member Avatar for Narue
-1
88
Member Avatar for FreakNFlow

I need help with a program. I need to know how to make it so the lines with a -1 will not show up. The code is linked to a file. The file looks like this: 4 112.7 154 115.5 4 116.4 321 -1 72 129.8 321 -1 154 219.0 …

Member Avatar for Salem
0
263
Member Avatar for seancoder

ok hey i really need some help with this project i believe i have finished a but been having problems with the program. the aim was to Request ten songs. Print out those ten songs and then Request for the user to categorize them by using their song numbers. So …

Member Avatar for Salem
0
104
Member Avatar for DHPena

Hello everyone. I'm developing a program where I need to write some data on a FIFO file, and I'm using the command Write() for that. My problem, is that with that command I can't send integers, so I was thinking about Convert them to Char, and then increment them on …

Member Avatar for DHPena
0
422
Member Avatar for senthil08
Member Avatar for Salem
0
28
Member Avatar for johndoe444

[CODE]typedef struct _node node; typedef struct _node { int is_leaf; node child[THRESHOLD_ITEM_SET]; list<item_set> candidate_set; } node;[/CODE] or this: [CODE] typedef struct _node { int is_leaf; struct _node child[THRESHOLD_ITEM_SET]; list<item_set> candidate_set; } node;[/CODE] I am getting error: error: field ‘child’ has incomplete type I don't want to declare child as pointer. …

Member Avatar for mitrmkar
0
94
Member Avatar for blackrobe

Hey, I have a problem that I'm not sure if its from running on windows or not. Lets say I have the following MakeFile for compiling and creating the executable of 'target.c': [CODE] FLAGS = -Wall -g all : target target : target.o gcc ${FLAGS} -o $@ $^ target.o : …

Member Avatar for Ancient Dragon
0
104

The End.