19,876 Topics

Member Avatar for
Member Avatar for its.romi

Added binary Tree just to help others..... [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> void formatting(void); int input(void); struct binTree* createNode(struct binTree*,int); void insert(struct binTree*, int); struct binTree* searchNode(struct binTree*, int); struct binTree* search(struct binTree*, int); void dispTree(struct binTree*); struct binTree{ int item; struct binTree *leftChild, *rightChild; }*root=NULL, *node; void main(void) { char …

Member Avatar for Narue
0
119
Member Avatar for Ravenous Wolf

am i the only one who thinks that c# screen development really sucks? i have just completed the silly task of repeating the same 30 lines of code sixteen times. and why, some might ask, are you so silly to do that? it is because, unlike java and visual basic …

Member Avatar for latitude7ds
0
100
Member Avatar for jpaulite

guys would help...with my assign...this is the problem... create a program to input 8 words with maximum of 15 characters.display the words in alphabetical order...tnx..

0
59
Member Avatar for guccica

Hi all, would need your help on unzipping message which is zipped with java.util.zip. For your information my module was written in c++. Currently i am trying to unzip with zlib, how ever it failed with "Z_DATA_ERROR" error. Please advice.. thanks a lot. regards brandon

Member Avatar for guccica
0
120
Member Avatar for stolson

I have read in a file, and i can print it out successfully, but i must sort the pointer to the array of structures. below is my code. I must sort the phone book in ascending order by zip code. If anyone could please help that would be great. [code] …

Member Avatar for AndrewWood
0
627
Member Avatar for vkiller

I am workring on a program that can simulate an array of disks and from an event list, record their mean time to failure (mttf), mean time to repair(mttr) and stop the program when it encounters dataloss. so we would also need to record the mean time to data loss …

Member Avatar for Salem
0
200
Member Avatar for kfupm

i want to ask if any one could help me with this Q how to approximat a square root???????? PLZ help me i want example

Member Avatar for Salem
0
76
Member Avatar for maye13

here's the program i'm trying to run, but everytime i press ctrl+f9.. i get the error in that picture below.. [code]#include<stdio.h> #include<graphics.h> #include<dos.h> #include<conio.h> #include<stdlib.h> main() { int choice; clrscr(); printf("Please choose a version you like: "); printf("\n<1> Random lang\n"); printf("<2> Moribund...\n"); scanf("%d", &choice); switch (choice){ case 1:{ ran(); break; …

Member Avatar for maye13
0
118
Member Avatar for jsmith9990

Hi , i''m Smith. I want to know more abou C pointers . And its use in C. Friends, those who are interested in this topic please give me good idea . First of all i want to know About basic things about pointers. What is a C pointer? And …

Member Avatar for Narue
0
108
Member Avatar for redaqen

Hey everybody, Once again, I find myself humbled and confused. You see, I have a text adventure engine (although at this point its just a map traversal... doesn't end yet :P) and I'm having a few issues with the commands. I can move around the map just fine and I …

Member Avatar for deadswitch
0
78
Member Avatar for tamlo

Am trying to write a structure to store weather data for a particular month. total rainfall High temp Low temp Average temp Am trying to calculation but not getting anywhere. I need help please. (1)Not sure how to add the 12 rainfall to get the total rainfall and the average …

Member Avatar for Lerner
0
163
Member Avatar for syndal

hi all, I am new to this site and hoping to get a solution to my problem.I am using ethereal to capture the packets in the network and the file is saved as .cap file.now using c prog i should filter out only dns packet in that file.can any one …

Member Avatar for WaltP
0
118
Member Avatar for ashok1424

hello i would like someone to help me to create a code in C for prompting a user to name a text file and then open it please help me ASAP thank you.

Member Avatar for Nick Evan
0
104
Member Avatar for chaosatom333

hi, i can't seem to a.out the program for some reason. When i type in a.out, the cursor just stays there. I think it goes in a infinite loop. I am trying to read two text files and then putting the atomic number in order. what seems to be the …

Member Avatar for Nick Evan
0
117
Member Avatar for ithelp

Hi Experts, What kind of tool do you use to unit test your C++ code in your project ?

0
53
Member Avatar for Marauder_Pilot

I'm trying to go through an array of char where all the chars are numbers, convert them to int, add them together, and save them as char again. For example, char string1[10] ={'0','0','0','9','3','1','4','0','9','1'}; char string2[10] ={'0','0','0','4','1','7','4','2','6','5'}; should produce an end result of char string3[10] = {'0','0','1','3','4','8','8','3','5','6'}; However, it won't convert …

Member Avatar for Ancient Dragon
0
119
Member Avatar for doublex

hi there, i try to map a file in memory, in linux, using mmap, so that what i write in memory will be written in the file as well. the piece of code looks like this [code=c] fd = open(argv[1], O_RDWR); if (fd == -1) { error_message(__FILE__, __LINE__, "'open' failed …

Member Avatar for doublex
0
125
Member Avatar for controlsi

Ive been working on this program for a little while now. and i keep getting the error messages: proj6b.c:61: error: syntax error before '{' token proj6b.c:68: error: syntax error before '{' token ive looked over the code and cant seem to find were the problem is. I am also a …

Member Avatar for Ancient Dragon
0
119
Member Avatar for ravi_forum

Hi Can any one help me what is the order of evaluation for the expressions in printf() function in C language..... I have sooo much confusion in the expression like a=10; printf("%d",a++ - a++); the output is -1 any one can help me how -1 is the output...... But when …

Member Avatar for Salem
0
923
Member Avatar for cessna172

[code=c] #include<stdio.h> #include<stdlib.h> struct sales { int week; char name[20]; int units; int price; }; int main () { char data1[300]; int itemAmount = 0; char itemNumber[10]; int timeToFinish = 0; int elapsedMinutes = 0; int iLoop = 0; int readCounter = 0; int finishTime[20];//holds the finish items int counter …

Member Avatar for invisal
0
132
Member Avatar for rabeb

Create a modular program in C that generates and modifies a number of circular double linked lists. Each node in the circular double linked list should have two pointers which should “point” to the next and the previous node. And that the double linked list is in the form of …

Member Avatar for rabeb
0
180
Member Avatar for sara_84

typedef struct node node struct { int when i run the C program, compiler give me an error which is , is expected, help me

Member Avatar for iamthwee
0
172
Member Avatar for sa-al

i want to define a function that calculates the " integral" of a function

Member Avatar for Jishnu
0
85
Member Avatar for devilofangel

i am new at programming basic.. i got this problem at school... i want to seek help from you!..its all about inserting and deleting arrays in c language!.. im really confused about the code of this...pls help me!... for example: given this output: Menu Operations: [1]Insert at beginning [2]Insert at …

Member Avatar for Jishnu
0
143
Member Avatar for ashok1424

Hello i got this project that i have to do and im very bad C# and need help ASAP i have done a little bit but not much i will display the coursework outline and after that the code that i have done so far, i would appreciate it if …

Member Avatar for InfiNate
0
147
Member Avatar for adiaforos

i am writing a program for seats reservation... here is the thing.... we have only one airplane with 10 seats... type (1) for expensive seat type (2) for cheap seat type (0) for exit you have to use seats[10] array and you have to do seats[10]={0}; if you type (1) …

Member Avatar for Jishnu
0
117
Member Avatar for uber_noob

i dont know how to pass variable values from a function to another.. i get this error passing arg 1of 'add' makes integer from pointer without a cast here is my complete code: (this is not complete as i am just starting a text-only calculator :P) [code] #include <stdio.h> void …

Member Avatar for Jishnu
0
97
Member Avatar for Barefootsanders

Hey everyone, I'm attempting to write a header file, example.h that will contain function declarations that will be defined in example.c. For some reason Its giving me an error when i do this [CODE]extern void mainMenu(node*);[/CODE] Now node is a struct defined in another header file, should I include that …

Member Avatar for Barefootsanders
0
131
Member Avatar for AbberLine

Hi Recently I started programming C (not C++) in borland 4.5 at school. Now my teammate and I have to make a small game. Therefor I will use an two-dimensional array, the field (a table, rows and colmnes). This two-dimensional array holds chars ("X", "|", "J", "-" and " "). …

Member Avatar for AbberLine
1
224
Member Avatar for kadeemdagreat

[code=c] #include <stdio.h> #include <math.h> char decesion_matrix(double hh) { if(hh < 5) { printf("statement 1\n"); } else { printf("statement 2\n"); } return 0; } int chara_sum (int ii, char string[ii]) { int loop; char a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z; double hh; hh = 0; for(loop=0;loop<ii; loop++) { if(string[loop] == a) { string[loop] = 1; …

Member Avatar for Ancient Dragon
0
135
Member Avatar for Ravenous Wolf

here is a question which some would consider silly but i would still love to ask. what are the chances of C# or java replacing c++ as the gaming language? more and more books are being written about game design in C#. c++ has the advantages of being fast and …

Member Avatar for maddog39
0
188
Member Avatar for zeiken

I would like to request the basic tutorial in c programming pls help me because im still the beginner

Member Avatar for Aia
0
49
Member Avatar for chaosatom333

Hi, i am given an array of atomic numbers, and I need to arrange them in order from 1-100 or something. the program i wrote is this [code] for(fill = 0; fill < (m-1); ++fill) { if(atomic_num[index_of_min] <= atomic_num[fill]) { temp = atomic_num[index_of_min]; atomic_num[index_of_min] = atomic_num[fill]; atomic_num[fill] = temp; } …

Member Avatar for iamthwee
0
283
Member Avatar for bugmenot

Hi, I have a linked list which I created in a function? I want to allow the user to enter a name for the linked list, and then after he/she can display the list by typing in the title. This is part of my code [code]struct llistt{ char str[100]; // …

Member Avatar for Narue
0
171
Member Avatar for richardtate

As requested by crunchie I am posting this as a new thread. Have an XP computer that is continually displaying C:\windows\system32\append.dll is not a valid Windows image. Crunchie has suggested I run SDFix.exe and also Highjackthis. I have run Spybot on this computer and also doing full virus scan right …

Member Avatar for sbarron2000
0
163
Member Avatar for iaaan

Basically for part of my assignment, I have to write my own int to string. This is done, however the problem is I can only enter 6 digits to convert otherewise my program crashes. Out lecturer also wants us to use the abs function as the value passed in can …

Member Avatar for iaaan
0
101
Member Avatar for meekblood25

please help me with this problem: i have to linked list, i need to compare them, and do something with regards to there result..

Member Avatar for Narue
0
64
Member Avatar for Ljupco

I must to write i program in C which will carry into clause(sentence) from keyboard and count how much "," have how much spaces " " have and how much times occur the word "The" for every clause(sentence). And in the end program when you carry into clause(sentence) must print …

Member Avatar for WaltP
0
91
Member Avatar for ellas747

i have this project to do for class. i get how the program works.here is the project: Use a single subscript array and functions to solve the following problem. A company pays its salespeople on a commission basis. The salesperson receives $200 per week plus 9 percent of his/her gross …

Member Avatar for invisal
-1
119
Member Avatar for rpjanaka

hi all, i want to execute a function by a separate thread and get that functions return value in to the main thread. one way to do this is set a global variable by that separate thread and access that variable from the main thread. This procedure is as follow. …

Member Avatar for Salem
0
104
Member Avatar for chaosatom333

Hi, i merged two files into chem.out but i need to figure out how I would arrange them by atomic number and how i can eliminate the duplicates. Should I use structures? here is the program i wrote so far, [code=c] #include<stdio.h> #include<math.h> #include<string.h> void merge_chem(FILE * inp1, FILE* inp2, …

Member Avatar for Salem
0
260
Member Avatar for sara_84

[code=c] #include<stdio.h> #include<string.h> /*#include<stack.h>*/ #define MAX 10000 #define TRUE 1 /*typedef struct node node struct node { int */ [COLOR="red"]int graph[MAX][MAX]; /* = { { 0, 1 },/* 0 1 0 */ /*{ 1, 1 }};2 0 0; */[/COLOR]int nodes; int fnodes; int counter2 = 0; int counter = 0;//Start …

Member Avatar for sara_84
0
155
Member Avatar for chaosatom333

Hi, I copied one file into another but couldn't figure out how I would number the lines and put a heading on chem.lis, which is the output. here is the program i wrote so far [code=c] #include<stdio.h> #include<stdlib.h> #include<string.h> int main(int argc, char *argv[]) { FILE *inp, *outp; char ch; …

Member Avatar for Duoas
0
271
Member Avatar for sara_84

i want a simple program to implemet the deterministic finite auyomata (DFA) using C language, this is code help me to let it work, this what i have currently and i convert it from C++ to C but i still have some error #include <iostream.h> /*#include<stack.h>*/ #include<stdio.h> #include <string.h> #define …

-1
71
Member Avatar for BensonRoss

Trying to write a program that will add two vectors (of type vect_t) and return a vector of type vect_t. Though I can't get my add_vect function to work. lots of redefinition errors telling me different basic types, and i can't figure out how to make it work right. Any …

Member Avatar for BensonRoss
0
99
Member Avatar for PacoLoko

ok, i'm trying to do a simple DES program... and i need help to do the permutation that's my first simple code, i need to chance the order of bits of 3 chars i have the table table={11,15,3,7,12,5,8,17,24,21,4,1,6,9,2,13,10,14,23,18,20,19,22,16} //24 bits i have idea how to do about 8 bits[a simple …

0
51
Member Avatar for gatzos_barca

Hello All, I just want to ask what this programme does. Actually i know what it does, i just wanna know the exact operation of it. [code=c] char *u ; //declare the string char k; unsigned int x; // declare integer int i; u = " University " ; k …

Member Avatar for ithelp
0
133
Member Avatar for ssriram

Hi all, I'm working on a GPS/GSM based project and I want to convert the RMC parameters to BINARY format. Actual RMC Sentence looks like this: $GPRMC,171004.031,A, 3658.4246,N,12201.3362,W,23.44,255.42, 060206 Interpretation as follows: 171004.031 = UTC of position fix (hours, mins, secs, decimal secs) A = GPS Status, Valid (V = …

Member Avatar for Belrog
0
211
Member Avatar for vonzul

This program should traverse a directory and save the file names into an array so I can manipulate data within the files. The problem is that the program prints the name of the files in the first loop, but it only saves the last file name in the array. Below …

Member Avatar for vonzul
0
3K
Member Avatar for msr

I know this thread is "a little bit" old, but i would like if you can help me. Im using sprintf(). This is my code: [CODE] int countDigits(int inteiro,int max){ char *string; string = (char *) calloc(max+1,sizeof(char)); sprintf(string,"%d",inteiro); return strlen(string); }[/CODE] However if the first digit of "inteiro" is a …

Member Avatar for mcldev
-1
358

The End.