49,761 Topics

Member Avatar for
Member Avatar for anuj10

Write a C++ program that reads a series of 12 temperatures (floating-point numbers) from an input file. It should prompt the user for the name of the input file. The input file should be place in the same directory where your source program resides. It should write out on the …

Member Avatar for mattjbond
0
262
Member Avatar for metdos

Hello Everyone, I'm trying to implement a Polymorphic Queue. Here is my trial: [CODE]QQueue <Request *> requests; while(...) { QString line = QString::fromUtf8(client->readLine()).trimmed(); if(...)){ Request *request=new Request(); request->tcpMessage=line.toUtf8(); request->decodeFromTcpMessage(); //this initialize variables in request using tcpMessage if(request->requestType==REQUEST_LOGIN){ LoginRequest loginRequest; request=&loginRequest; request->tcpMessage=line.toUtf8(); request->decodeFromTcpMessage(); requests.enqueue(request); } //Here pointers in "requests" do not …

Member Avatar for metdos
0
286
Member Avatar for class11a

Hi, I’m trying to use the following code in C++ on Mac OS X Snow Leopard to get the output of an external program through a pipe. [code=c++] FILE * al = popen("program program.cfg", "r"); string data; char buffer[100]; while (fgets(buffer, 100, al) != NULL) data.append(buffer); cout << "«" << …

Member Avatar for class11a
0
199
Member Avatar for bletchley

I'm pretty proficient with Java but am not sure what's going on with pointers, classes, or imports/includes in C++. I originally had a size() function but I was getting error about it conflicting with my 'int size;' variable. Can functions not share the same name as variables? I renamed it …

Member Avatar for jonsca
0
122
Member Avatar for shilpa.joshiv@g

hi,,, i have converted the image in to gray and created itz histogram...nw i m applying various filters on the gray image...my problem is: 1.. want to display the result image after filtering in dialog box... for this i have created the dialog class...but not getting how to send the …

Member Avatar for mattjbond
0
112
Member Avatar for Darkwarrior_331

Hi there, i'm trying to make a program which translates a word from one language to another, using files (one file for each language) i'm using fgets, to read a line from the file and then comparing it to what the user entered, and strcomp() to see if the words …

Member Avatar for mattjbond
0
150
Member Avatar for pinsickle

I am planning on starting a project during summer break. I am going to create a employee clock in system for my work place (and anywhere else that wants it.) I figured it'd be good to get some practical experience before I graduate. The actual structure of the program I …

Member Avatar for aminit
0
102
Member Avatar for skorm909

i was putting the finishing touches on my project and there are some errors that came up here is my code: [CODE] else if (action == 3){ system("cls"); cout << "Russia has an entrenched, albeit underfunded, system of socialized medicine. Basic medical care is available" << endl; cout << "to …

Member Avatar for skorm909
0
191
Member Avatar for techstu

hi...i have to create a code generator in c++, but i am starting from scratch , so first i need to create an xml file.... can anyone help me to create a simple xml file, with only two fields i.e., name and surname.... and this is where i'll fetch the …

0
49
Member Avatar for omgaga

Declare a 2-D array that will contain up to 20 rows and 15 columns. The template for this lab that has been posted on ANGEL contains code to prompt the user to enter the number of rows and columns he/she would like to use, confirms the user’s entry is valid, …

Member Avatar for vmanes
0
115
Member Avatar for kyle11778

so some day i want to hand code a security program(anti-virus probably). but i dont know where to start on theory and actual code. Where should i start and what language is most common? Where did you start if you have been in the same bind i have? thanks to …

Member Avatar for vijayan121
0
76
Member Avatar for dls_20022002

hello everyone, im currently writing a code for a library, and i needed help trying to figure out how to write a code to check an object in or out. im how would i make it user friendly to simply press Y OR N TO CHECK A BOOK IN OR …

Member Avatar for Ancient Dragon
0
64
Member Avatar for fugnut

I have been tasked with writing a program that will read in from 2 files and determine a premium rate depending on age. I have written part of the program and I am simply trying to make sure that what I am reading in is correct. The input file has …

Member Avatar for WaltP
0
85
Member Avatar for wanst666

i`m having error message problems,the computer that i use doesnt have a null device..so when i compile a code it will display "Project : error PRJ0015 : The NULL device is missing from your system. We are unable to launch a build." does anyone have an answer to this..please help …

Member Avatar for Ancient Dragon
0
54
Member Avatar for bobby101

HI im tryin to get user input od a date and than get the week number so far i have lernt how to do the week number but need help in getting a date frome user input so far: ----------------------------------- [CODE]int week; char date[3]; struct tm tim; time_t now; now …

Member Avatar for Ancient Dragon
0
84
Member Avatar for c1979h

I have one error in my code Error 1 fatal error C1075: end of file found before the left brace '{' at line 50 The program is suppose to ask the user for a filename, read and display the file. Then show 24 lines per screen. I thought I checked …

Member Avatar for c1979h
0
203
Member Avatar for skorm909

so this is the part of my code that has an error: [CODE]int Mainmenu(){ system("cls"); int action; char action1; cout << "Welcome to my Quarter Project." << endl; cout << "What would you like to learn more about?" << endl; cout << "1. Medecine in the United States." << endl; …

Member Avatar for skorm909
0
88
Member Avatar for Juicy5ursoul

Programming Assignment Employee Payroll Report Write a program that generates an Employee Payroll Report. The input for the program consists of a collection of data containing the last name, hourly pay rate, and the number of hours worked, for a set of employees. The output of the program is a …

Member Avatar for WaltP
0
179
Member Avatar for jprogram

I have tried to fill an array with randoms numbers between zero and nine. The code I have used so far is this. int a[40], b[40]; for (int i=0; i<39; i++) { a[i]=(0 rand() % 9); b[i]=(0 rand() % 9); } Why will this not work?

Member Avatar for craig_ka
0
112
Member Avatar for DawnDenise

I see that this problem has been posted a few times before but I cannot manage to find the bug in my program. When it runs, it does not return the values in ascending order. For example, upon entering two test values, I get 0 and 1519848. Any hints would …

Member Avatar for DawnDenise
0
207
Member Avatar for CppBuilder2006

This is the project of my program: [url]http://www.4shared.com/file/259396798/53d2a9dc/MRKtack.html[/url] it works in Visual C++ 2008 Express! please download & test it on your compiler. it is an API graphical program. It works in my Windows XP properly! but when I install it on Windows Seven/Vista there is a problem with painting! …

0
77
Member Avatar for jeffcruz

I have this assignment; Create a class named Student. The class should consist of the following private member variables: social security number and name (last, first or first, last?). The social security number (SSN) should be a long integer. The name variable should be a character array of 80 characters. …

0
32
Member Avatar for Drunk.scientist

hey every one, I am a bit of a n00b here too, so than ks for baring with me. I am trying to creat a program that conjugates a verb from present tense to past tense. to do so, I need to conert a string to a character type for …

Member Avatar for Drunk.scientist
0
549
Member Avatar for pichi20

Hey, I need to do a program that displays a menu with 5 options that works with search and sorting of arrays of unordered decimal numbers: 1)Read file 2)Linear Search 3)Binary Search 4)Bubble Sort 5)Selection Sort each option has to display the result. with the option 1 has to ask …

Member Avatar for Software guy
0
108
Member Avatar for edbtzy

I am trying to make a program that calculates the amount of money saved with compound interest. It needs to output the amount of money saved for each year it accrues. This is what i have so far , using a for loop: [CODE]int main () { double p; double …

Member Avatar for Jiwe
0
219
Member Avatar for Falmarri

Is there a c++ library, preferably an STL, that can parse for regular expressions? Or is there an open source standard expression that I could preferably just include in a header instead of having to link against? I've never been good with regular expressions though. What I'm trying to do …

Member Avatar for Falmarri
1
141
Member Avatar for CppBuilder2006

how can I complete/run the example on this page: [url]http://msdn.microsoft.com/en-us/library/ms644960(VS.85).aspx[/url] :icon_idea:

0
64
Member Avatar for Pynolathgeen

Hello, I'm programming this patcher for my upcoming 2D Game, called Argyus Online. When I compile the patcher it works on my computer but when I execute it to my moms laptop, it give me some error. I can't translate it to english but I think its something with the …

Member Avatar for Pynolathgeen
0
111
Member Avatar for Pynolathgeen

Hello, I created a fully working progress bar for my 2D Game patcher. I have a question, Is it possible to have an Image painted on the progress bar? I know its possible in VB but I wanna try it in C++. I could find any results using Google. Thanks!

Member Avatar for Pynolathgeen
0
210
Member Avatar for skorm909

so when i have my if statement, if someone goes to put in say: 1 for the answer, and 1 wasnt a choice, when i put it in again it closes the program, heres an example [CODE] int action; cout << "press 2, 3, or 4." << endl; cin >> …

Member Avatar for Fbody
0
156

The End.