15,554 Topics

Member Avatar for
Member Avatar for urufukiba

im trying to make a program that reads a text file in the format: 2 polygon 3 90 90 90 90 90 90 polyline 2 12 80 30 15 (not the real numbers obviously) and have the program read how many things, what type, how many points for that type, …

Member Avatar for urufukiba
0
92
Member Avatar for niall_heavey

I am trying to make a database of images. The purpose of this is for Robocup soccer tournament. When the robot sees an image while playing it can then refer to its database of images and match its image with one in the database. The database image should have properties …

Member Avatar for Nick Evan
0
78
Member Avatar for taichou

hi, it's me again, uhm i have this program for bantumi game, this program is running, but there are some problems i am encountering whenever i execute it.. hope you understand my program.. [code=c] //this is a two player bantumi game,the user will enter the position in the board game …

Member Avatar for geemicah
0
131
Member Avatar for gsingh2011
Member Avatar for death_oclock

Visual C (2008) is acting as if I never included a header file (wave.h) that I am using, but the #include statement is definitely there. Here's my main (BPM analyze.c): [CODE=C]#include "stdafx.h" #include "common.h" #include "sound.h" #include "wave.h" int main(int argc, char* argv[]) { SAMPLE samples[2]; unsigned int i, j; …

Member Avatar for Aia
0
133
Member Avatar for zoner7

I'm currently taking a computer security class. The thing is, I haven't even taken an intro computer programming course. I taught myself a good deal of C++ back this summer, but I hardly know as much as the other students in the class. we were asked to manipulate the following …

Member Avatar for zoner7
0
801
Member Avatar for plike922

I am try to change my previous created program that get student data from 5 students and stores it into a data base. i want to make it that you can choose the amount of students to put in. I was thinking of asking for the number then changing the …

0
76
Member Avatar for hsoni007

When I run the following program , after loop it outpur "Enter Valid Number". How can I solve this problem? --------------------------------------------------------------------------------- #include <stdio.h> #include <conio.h> #include <string.h> void main() { int var1,var2,sum; char Choise; while (Choise!='q'){ printf("\n(1)A-Add two integers.\n\n(2)C-compart two integers for the larger.\n\n(3)F-Test an integers for odd or even.\n\n(4)Q-Quit.\n\n"); …

Member Avatar for Salem
0
102
Member Avatar for mohinig

i m a new user of c language.whenever i try to run my program a message error is displayed as"not able to open the file named C0S.OBJ.what is the meaning of that?and what should i do?please anybody help me.

Member Avatar for Salem
0
93
Member Avatar for Logi.

Hi there, I am trying to write a queue ADT using a linked list in C and have hit a snag initialising my queue... [code=c]typedef struct qNode{ int element; struct qNode *next; } qNode; typedef struct Queue{ struct qNode *front; int len; } Queue; Queue create_queue() { Queue q = …

Member Avatar for Logi.
0
183
Member Avatar for Lovieron

THIS PROGRAM IS not yet complete the only problem is when the program calls for the find it process..it does not work perfectly i don't know why..but when i separate it its working..please help me with this.. this is how it looks separated from the optional program: #include<stdio.h> #include<conio.h> int …

Member Avatar for Aia
0
199
Member Avatar for mohan_198505

hi ,i want to know that if i m taking the input from user in C through scanf what should be the code if the requirments are following. 1.should accept string minimum of 3 and maximum of 15 characters. 2.accept alphabets ,blank space hyphen(-)and & 3. first latter should be …

Member Avatar for Aia
0
112
Member Avatar for lonely_girl

Hi. Ive made this program using if statements i see no errors in it but i dont know my program isnt working on my if statements i mean the if statements are not used in the output. Can u plzz figure out the problem? It works only till scanf statement. …

Member Avatar for lonely_girl
0
141
Member Avatar for encee

i am trying to read a text file like this and store each number as an integer (without the decimals) and print them 1 3 5.6 3 2.1 4 2 2 3 4.2 1 here is what i have now [code=C] #include <stdio.h> #include <conio.h> void main() { int i, …

Member Avatar for me_ansh
0
1K
Member Avatar for slnvpraveen

/* MATRIX ADDITION */ #include<stdio.h> #include<conio.h> #define MAX 100 struct Matrix { int Element[MAX][MAX]; int No_of_Rows; int No_of_Cols; }; void MatrixAdd(const struct Matrix *,const struct Matrix *,struct Matrix *); int i,j; void main() { int p,q; struct Matrix Mat1; struct Matrix Mat2; struct Matrix res; clrscr(); printf("\nEnter size of the …

Member Avatar for Aia
0
92
Member Avatar for Trendkiller

I can't find the error and also C2182 error: illegal else without matching if. [code=c] #include <stdio.h> int main (void) { int count=0; //counter int hours; //hours char choice; //users choice for continuing float total=0; //total charge //print display printf ("%-15s %-10s %-10s","Customer","Hours","Total Charge"); //assinging customer number count++; //ask for …

Member Avatar for me_ansh
0
326
Member Avatar for me_ansh

Hello every one, I have a confusion regarding arrays and pointers, My question is: "Is array name a pointer (rather a constant pointer)"?? I feel the answer is 'yes' because we can use the de-referencing operator(*) with the array name, Also, because array name is a constant pointer so we …

Member Avatar for Narue
0
259
Member Avatar for asharrajpoot

i want to show output like this [code] A B C D E F G F E D C B A A B C D E F F E D C B A A B C D E E D C B A A B C D D C B …

Member Avatar for me_ansh
0
186
Member Avatar for boomtoom

void main() { int number; totalCallsPtr pcall=NULL; getData(&pcall,&number); } void getData(totalCallsPtr* pcall,int* number)//get data from the text file { int i,n; FILE *f1; f1=fopen(INPUT, "r"); if (f1==NULL) printf("File not open!\n"); else { fscanf(f1,"%d",&n); *pcall=((totalCallsPtr)malloc(n*sizeof(CALL))); } if((*pcall=(totalCallsPtr)malloc(n*sizeof(CALL)))==NULL) printf("not enough memory to allocate"); for(i=0;i<n;i++) { fscanf(f1,"%d ",&pcall[i]->day); fscanf(f1,"%d:%d:%d ",&pcall[i]->startCall.hours,&pcall[i]->startCall.minutes,&pcall[i]->startCall.seconds); fscanf(f1,"%d:%d:%d ",&pcall[i]->endCall.hours,&pcall[i]->endCall.minutes,&pcall[i]->endCall.seconds); fscanf(f1,"%c",&pcall[i]->type); …

Member Avatar for me_ansh
0
121
Member Avatar for titosd

Hello, I have a question I should write a program that read words from file text and sort it by ABC letters in array, and ask the user to enter a sentence and chcking if the words in the sentence existing in the array. the program checking all the words …

Member Avatar for me_ansh
0
190
Member Avatar for Lovieron

i need help regarding determining the longest word of a string..we would enter a sentence and the program would display the longest word/s i have read ideas about the strtok but i cant seem to understand it that much..and we havent discussed that yet so my prof might question it..i …

Member Avatar for Lovieron
0
135
Member Avatar for TheBeast32
Member Avatar for MosaicFuneral
0
54
Member Avatar for akim_atl

I wrote this program and I need to know if I didn't make a mistake Let arr be an array of 20 integers. Write a program that first fill the array with up to 20 input values and then finds and displays both the subscript of thee largest item in …

Member Avatar for Aia
0
87
Member Avatar for Wassa76

I have a text file containing several lines of IP's and Ports with 3 sets per line. For example: [CODE]IP1=1.2.3.4 PRT1=100 IP2=2.3.4.5 PRT2=200 IP3=3.4.5.6 PRT3=300 IP1=12.34.56 PRT1=1000 IP2=2.3.4.5 PRT2=200 IP3=3.4.5.6 PRT3=300[/CODE] I want to read in each line, see if PRT1 matches a specific port, if so then print out …

Member Avatar for Wassa76
0
61
Member Avatar for bemo55

I am doing an extra assignment for my CSCI class. The assignment asks to create a program that calculates hours for customers in a parking garage. i wrote my program out and now i am trying to break it down into custom functions. i was doing fine until i got …

Member Avatar for death_oclock
0
96
Member Avatar for atman

[CODE] #include<stdio.h> #define COUNT 5 void enter(int *p_arr); void report(int arr[], int count); int main() { int arr[5]; int i; for(i=0; i < COUNT; i++) { enter(&arr[i]); } report(arr, COUNT); } void enter(int *p_arr) { int i; int insert; printf("\nplease enter the number:"); scanf("%d", &insert); p_arr[i]=insert; } void report(int arr[], …

Member Avatar for atman
0
120
Member Avatar for mohan_198505

hi, i m mohan i hv problem related to file handling. i hv two txt files emp.txt and dpt.txt.these are following emp.txt 1111 Tata 1000 12354663 1112 Suresh 1001 -46436433 1113 Hari 1002 46546735 1114 Ramaji 1000 -54651324 where 1111 is a empId,Tata is EmpName,1000 is DeptCode and 12354663 is …

Member Avatar for death_oclock
0
89
Member Avatar for rhoit

I was creating some sort of text editing program. Whose display and file writing are going parallely. How to clear the character in the file when i dont back space. I tried clear character by replacing with Space(32), NULL(0), but it didn't workout fine.. just replacing the character...how do delete …

Member Avatar for Murtan
0
132
Member Avatar for venomxxl

Hello, I had no idea which title I should have chosen. Anyway, I'll try to explain my problem. What I'm trying to do is to prevent some code using functions in a header. This problem causes invulnerabilities in my application. I made a test program to show what exactly I'm …

Member Avatar for venomxxl
0
136
Member Avatar for mohan_198505

hi i m mohan sahu.i m using turbo c( borland compiler) and working with windows xp. i have one header file say myheader.h having only declarations of all functions and one myfunc.c file having only definitions of all function without main and i m including header file with #include "myheader.h" …

Member Avatar for ajay.krish123
0
161

The End.