15,551 Topics
| |
//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( … | |
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. … | |
[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; … | |
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 … | |
[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 … | |
[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) | |
[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] | |
hello sir/mam turbo c still is not opening with dos. now what should i do? plz reply me as possible as soon. | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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.... | |
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) … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 } … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Is it possible to animate object using Graphics.h in C.. | |
[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. … | |
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 : … |
The End.