15,539 Topics

Member Avatar for
Member Avatar for nicoletonyf

Hello there, I have to write a program using three classes. One for the input, a second for the transaction, and a third one for the report. Can I write the three class definition in one header file? Can I write the three classes in one .CPP file? Can I …

Member Avatar for Ejaz
0
99
Member Avatar for JoBe

Hi ladies and gentlemen, Gotta question, I have a program in wich I make a small array of 100 random numbers wich are smaller then 1000! Like this: # define MAX 100 void srand(int tabel[MAX]); void srand(int tabel[MAX]) { for (int i=0;i<MAX;i++) do tabel[i]=rand(); while (tabel[i]>1000); } This of course …

Member Avatar for JoBe
0
164
Member Avatar for jaeSun

ok, I have an assignment ... it requires the use of pthreads .. i pretty much understand it, well, sorta .... the assignment is to read input from the command line (input redirection) from a file the file contains a list of numbers, 1 per line, 50 total numbers max …

0
67
Member Avatar for Sanirsanir

hi guys, Anybody tell me a site where free system available on C language. Thanks in Advance, Sanir

Member Avatar for vegaseat
0
323
Member Avatar for tendekai

#include<stdio.h> #include<conio.h> #include<string.h> #include<iomanip.h> FILE *fp1, *fp2; int count; struct record { char name[20]; int empnum; char depart[20]; float hours; float rate; }; void main() { clrscr(); record h; int acount=0,adcount=0,scount=0; float grosspay,totalg=0; float tax,totalt=0; float health,totalh=0; float pension,totalp=0; float netpay,totaln=0; float deductions; fp1=fopen("employ.dat","r"); fp2=fopen("payrol.dat","w"); count = 0; printf(" ""Page1\n"); …

Member Avatar for Narue
0
193
Member Avatar for smiler

write a programm that define a linked list class , the program use this class to manipulate students data acadmy to the following options: 1- add new student . 2- remove student. 3- list all students data. 4- search for student data using ID . 5- search for student data …

Member Avatar for alc6379
0
92
Member Avatar for dex

hi how can i create animation on pulpit ? i can draw on pulpit : GetDC(0) but i can't refresh my picture on pulpit (clear pulpit) who can help me

0
51
Member Avatar for tendekai

#include<stdio.h> #include<conio.h> #include<string.h> FILE *fp1, *fp2; int count; struct record { char name[20]; int empnum; char depart[20]; float hours; float rate; }; void main() { struct record h; int acount=0,adcount=0,scount=0; float grosspay,totalg=0; float tax,totalt=0; float health,totalh=0; float pension,totalp=0; float netpay,totaln=0; float deductions; clrscr(); fp1=fopen("employ.dat","r"); fp2=fopen("payrol.dat","w"); count = 0; printf(" ""Page1\n"); …

Member Avatar for vegaseat
0
128
Member Avatar for Anu

Hi again, since my last thread I proceeded a bit and in the meanwhile took a closer look on Mode13h. I started programming some simple games like Snake etc, but I'm stuck on a specific function I couldn't discover yet: I need a getch(); which aint actually waiting for the …

Member Avatar for vegaseat
0
226
Member Avatar for Jpowers22

Recently we have been asked to create a hybrid sort based upon quicksorting down to a certain point and insertion sorting from then on. We are to calculate the efficency based upon previous tests. I had very little problems implementing a quicksort algorithm, but for the life of me, I …

Member Avatar for subtronic
1
3K
Member Avatar for jasweb2002

I need to write a class using a vector and this is my first time using vectors. But I have looked through several books/web pages and can't see why this thing won't compile. #include <vector> template <class el> class pQ { public: private: vector<el> a(1); }; Any ideas. There must …

Member Avatar for jasweb2002
0
97
Member Avatar for skywing

Is there a way to change the button's shape from rectangle to circle like those in Windows Media Player ? :?:

Member Avatar for vegaseat
0
147
Member Avatar for cblue

Does anyone know how to get a loop to display the numbers across the screen in groups of 10 usin a while loop? for example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 etc.....

Member Avatar for Dave Sinkula
0
97
Member Avatar for jasonburgess

Hey guys, Could you help me with this particular program, say, named wsh (wimpy shell) that reads commands from standard input, executing them one at a time. After starting the process to run a command, wsh waits for the process to complete before processing the next command. For example, the …

Member Avatar for Narue
0
94
Member Avatar for arizona24

program of strack -------------------------------------------------------------------------------- Hi, I,m Arvind .I have problem in stack programming,please tell me how to enter no's in a stack and how to check for overflow & underflow using push & pop function. arizona

Member Avatar for Narue
0
131
Member Avatar for HollywoodTimms

Here is what I have so far. #include <iostream.h> int main() { int i, total[3]; int myValue[3][3]; myValue[0][0] = 53000; myValue[0][1] = 5; myValue[0][2] = 1; myValue[1][0] = 89000; myValue[1][1] = 3; myValue[1][2] = 2; myValue[2][0] = 93000; myValue[2][1] = 3; myValue[2][2] = 3; for (i = 0; i < …

Member Avatar for Narue
1
479
Member Avatar for Alfy

i am suppose to multiply the two matrices together using a for loop, but the only way i can figure it out is by using printf( a[0][0] * b[0][0] + a[0][1] * b[1][0]) 4 times to find each piece. Please help. #include <stdio.h> int main() { int i,j,k; int a[2][2]={{1,2},{3,2}}; …

Member Avatar for Waskar
0
137
Member Avatar for trashed

[CODE]// Calcolo formula per Legge di Murphy ([url]www.andreagozzi.com[/url]) // Inclusione librerie in directory di sistema #include <math.h> #include <stdio.h> #include <string.h> // Funzione Main() main() { // Dichiarazione delle variabili float urgenza; float complessita; float abilita; float frequenza; float importanza; float e; // Impostazione variabile e fissata al valore 0.7 …

Member Avatar for trashed
1
171
Member Avatar for Alfy

write a function begins(string1, string2) that reurns true if string1 begins string2. Write a program to test the function. program: #include<stdio.h> #include<string.h> char begins(char sentence1[],char sentence2[]) { int i,j=0; for(i=0;sentence1[i]!='\0';++i) { if(sentence1[i]==sentence2[i]) j=j+1; else if(j==i) printf("True\n"); } return(0); } int main() { int i, j=0; char string1[100],string2[100]; printf("Enter a sentence:\n"); …

Member Avatar for Alfy
0
117
Member Avatar for rmerchan

I am getting a -NaN message and I don't understand why? The program so far compiles okay. But prints "the value of lat1 is -NaN." Any help would be greatly appreciated. # include<stdio.h> # include<math.h> float get_lat1(); int main (void) { float lat1; get_lat1(); printf("the value of lat1 is %f …

Member Avatar for Dave Sinkula
0
193
Member Avatar for HollywoodTimms

I gotta write a program that reads a file and determines a customers priority number. The program then builds a priority queue using hte priority number and prints the list of people waiting. Here is what I have so far int main() { int myValue[3][3]; myValue[0][0] = 53,000; myValue[0][1] = …

Member Avatar for HollywoodTimms
0
136
Member Avatar for minnie

[B]Is it possible to convert from VB code to C and what is the best way to do this?[/B]

Member Avatar for vegaseat
0
422
Member Avatar for bemrag

thank you for your replies but, I can't open the program. program doesn't work. If you have any different ideas please contact me. thanks....

Member Avatar for Dave Sinkula
0
103
Member Avatar for zoey

Hi can any one help me with the code to reverse 2 strings with [B]unequal[/B] number of characters in them...read the first line and secondline relpace the second line with reversd first line...and replace first half with reversed second line... thanks, zoey

Member Avatar for Narue
0
147
Member Avatar for Fleetfoot18

I'm suppose to execute the program in cmd prompt like this: fifo.exe data.txt However, I cannpt even get the program name which is fifo.exe. I found out that argc (parameter of main) does not even go to 1. It shows -1 instead. Why is this so? Anyone can help me?!?! …

Member Avatar for Dave Sinkula
0
77
Member Avatar for ooicheesan

:( ...hello there..currently i am doing the serial communication between my Vb at comm 1 with my PICDEM 2 PLUS BOARD..so i manage to send my data to the board to light up the LED but the data i send back by the board to VB that is "ok" to …

0
66
Member Avatar for felcris_pf23

hi!do you know how to make a program in C that can run the "*" 1.from left to rith? or 2.from rigth to left? 3.up to down? 4.down to up? 5.combination of all... pls...pls...pls....pls...help me.. :sad:

Member Avatar for alc6379
0
91
Member Avatar for jaeSun

i havent been able to find anyone to help me .... i am looking to create a queue .... i cant use a stack, as that is LIFO (last in, first out) ... but i need a FIFO (first in, first out) .... i have some code for a stack …

Member Avatar for jaeSun
1
281
Member Avatar for ray96

Hi! I had 1 problem in C, now I have another one. :o Please bear with me. I am learning the C language. Please run the following calculation in a scientific calculator. When the "=" sign is shown at the end of the calculation, be sure to press the = …

Member Avatar for vegaseat
0
330
Member Avatar for michal

Hi, I get this message when the program shold exit the main function. I think that the problam could be in that function (that is being called from main): void scanFileToMat( ifstream mFile,int arr[43][43]) { string m ,s; int pos; double sign; int col, value; getline(mFile,m,')'); while(!mFile.eof()) { mFile>>sign; arr[numSV][42]=sign>0; …

Member Avatar for Narue
0
479

The End.