49,761 Topics

Member Avatar for
Member Avatar for Woody714

I'm fairly new to C++ and have an assignment that is knocking me out. The text file is fairly simple: Plain Egg 1.45 Bacon and Egg 2.45 Muffin 0.99..... etc.... And the code is: [code=c] //Breakfast Billing System //Marlen LaBianco //May 20, 2007 //Program to calculate a local restaurant's breakfast …

Member Avatar for John A
0
921
Member Avatar for Matt Tacular

**I know the code looks big, but it's a very small isolated section at the bottom (starting at line 164) that's giving me the problem.** When this program is run, when I try to open the file I just appended some text to, it doesn't open... can anyone spot why? …

Member Avatar for Salem
0
145
Member Avatar for faisaly

Dear All, Please help me regarding this C++ Assignment. Q.1 [COLOR=green]Write a program using [B]malloc[/B] function. In which you take input from user and allocate memory equal to square of this number. Which multiply numbers and draw a table in the following format?[/COLOR] [B][COLOR=green]Hint: User enters 3 then program allocates …

Member Avatar for Salem
0
104
Member Avatar for MrMan2787

Hi all, I have a QUESTION regarding [B]data validation[/B] I'm writing a program, where i want the input to be [U]only integers[/U]. so if they enter things such as letters or symbols it won't crash my program. i tried stuff like, while(inputArray[count] != int) { cout << "Invalid Input. Please …

Member Avatar for Ancient Dragon
0
179
Member Avatar for wujianwei

here's the description: ============================================= You are asked to develop a C++ program that reads a text ¯le given by the user (e.g. test.txt), and output the frequency of the prepositions contained in the text ¯le on the screen. Your program shall provide a simple interface for the user to input …

Member Avatar for Ancient Dragon
0
118
Member Avatar for ledox

hi, i have a another question about converting char to int in C++. if i have [U]char n="123[/U]" and [U]char n2= "87"[/U] and i wanna sum those two char...how can i do that? i know i have to [COLOR=green]change[/COLOR] each [COLOR=green]char[/COLOR] in [COLOR=green]int [/COLOR][COLOR=green]but for the rest...[/COLOR] thank

Member Avatar for blazted
0
91
Member Avatar for CRD

this loop will not exit when n is pressed I sure would appreciate a clue as to how to exit a loop. here is the code. code [COLOR=green]// Ex3_12.cpp[/COLOR] [COLOR=green]// using a while loop to compute an average[/COLOR] [COLOR=green]#include[/COLOR][COLOR=green]<iostream>[/COLOR] [COLOR=green]using[/COLOR][COLOR=green] std::cin;[/COLOR] [COLOR=green]using[/COLOR][COLOR=green] std::cout;[/COLOR] [COLOR=green]using[/COLOR][COLOR=green] std::endl;[/COLOR] [COLOR=green]int[/COLOR][COLOR=green] main( [/COLOR][COLOR=green]void[/COLOR][COLOR=green] )[/COLOR] { …

Member Avatar for ~s.o.s~
0
65
Member Avatar for meiyantao

I don't know how to sparate the interface and their implement.And I need some help from you.For example,I hope anybody can tell me,how to make these three files to work well. [CODE] //This file named main.cpp #include <iostream> #include "ABC.h" using namespace std; int main(void) { char y='y'; char e='e'; …

Member Avatar for meiyantao
0
167
Member Avatar for ITech

hello guys, can anyone recommend me a site or alink for agud e book in learnin c++..startin from basics to advance...i have a very clear picture of C and data structures using C...

Member Avatar for vijayan121
0
185
Member Avatar for ghadahelal

hi all have anyone any idea how can i make my program read 3 or 4 files ,in a folder. i mean my input isn't only one file, it's a folder. can the C++ do that?

Member Avatar for ghadahelal
0
135
Member Avatar for CRD

Using Visuel Studio 2005 and the choices I have are as follows Could someome help me to understand what they are? ALT CLR General MFC SMART DEVICE WIN32 Any help to clarify what these choices mean would be Appreciated. Thank you Dick

Member Avatar for CRD
0
144
Member Avatar for Woobag

I'm trying to write a program where the user gives a size of an array. myArray(5) (below) fills and prints a 5x5 array with numbers 1-5 and prints out 5 numbers on a line. The output would look something like this... [code] 1 2 3 4 5 1 2 3 …

Member Avatar for Woobag
0
2K
Member Avatar for alpha_gamma

Hi all, I am working on a C++ program that converts a decimal to a fraction, finds the lowest common multiple, multiplies the numerator by the denominator, then reduces the fraction again so the fraction will be 'numerator/1'. I am using this code in a larger program to change a …

Member Avatar for iamthwee
0
466
Member Avatar for complete

Does anyone have any experience with the free Microsoft development enviroment called Visual C++ 2005 Express Edition? I have downloaded and installed it and I notice it is a lot different than what I am used to. Is MFC gone? If you click on New to create a New Project, …

Member Avatar for Ancient Dragon
0
167
Member Avatar for Zay

Hello; i have this Question and need your help, i do not know how to solve it; [B]Problem:[/B] Write a member function called [B]countNodeWithNoRchild[/B] that will return the number of nodes in a BT(binary Tree) does not have a right child. (Hint: a leaf node also does not have a …

Member Avatar for Narue
0
122
Member Avatar for raj1324

does gcc compiler support graphics file ?how to write graphics program in gcc?pls guide me. in india how to get gcc compiler cd? send me some address. hurry up thanks & regards all members and guest

Member Avatar for happygeek
0
173
Member Avatar for blazted

I wrote a hash table that takes a char as a key and for a test I am using a string for my value. It uses a linked list. But I am having a problem displaying the value. I have a function that displays the key correctly but the value …

Member Avatar for blazted
0
114
Member Avatar for Slavrix

my code was working, but when i added in a new section to enter playing against a computer player, it now hates me, and wont stop trying to kill me. [code=c++] //name: ******* //Lab: * //purpose: ******* //modification date:*********** #include <iostream> #include <cstdlib> #include <ctime> using namespace std; const int …

Member Avatar for Slavrix
0
89
Member Avatar for quintoncoert

I am currently working on a project which requires me to instantiate objects of a class. The class is in a dll which is accessed via its header file. I suspect that the dll does not work with visual c++ express edition which I am using. I would like some …

Member Avatar for vijayan121
0
250
Member Avatar for tunday

I am trying to write a program which sends text from a forms Rich Edit Boxes via 2 serial ports( COM3 and COM 4 have 2 rich edit boxes each for incoming and outgoing text) using Borland C++ Builder 2006. This program uses some C++ serial port communication library code …

Member Avatar for Ancient Dragon
0
157
Member Avatar for katerinaaa

Hi, I would like to ask if anyone know how can I create a tokenizer for a txt file in C++. I find it difficult because there are not only words but there are also numbers and <p id> tags. I have attached the file that is needed to be …

Member Avatar for katerinaaa
0
179
Member Avatar for stindeee

For home work i have to do SMS in c++ ,which has to be exactly like on mobile.I dont know how to do this.

Member Avatar for WolfPack
0
87
Member Avatar for stonecoldstevea

Need to write c++ code that calls a function and validate the moduleCode with a do...while loop. I ca'nt get the function to go out the loop Pleez help void inputAndValidate(string &moduleCode,int &numberHours) { string ABC111,DEF112,XYZ113; do { cout << " Enter module code: "; cin >> moduleCode; } while …

Member Avatar for jaepi
0
107
Member Avatar for quintoncoert

can anyone tell me the difference between visual c++ express edition and visual c++ .net? It would apear that they are the same. Both seems to use the dot net framework. Are there any significant differences? And also how do they differ from other types of c++ such as ansi …

Member Avatar for jwenting
0
123
Member Avatar for lilmiss

Create a class called [B]DateProfile[/B] that has the following private instance members: [LIST] [*][B]gender[/B] - a [B]char[/B], the gender of the applicant.('M' or 'F'). [*][B]search_gender[/B] - a [B]char[/B], the gender ('M' or 'F') of desired partner (this is not the gender of the applicant, but of the applicant's requested partner. …

Member Avatar for jwenting
0
140
Member Avatar for tralfas
Member Avatar for tralfas
0
134
Member Avatar for laconstantine

Hi Everyone, I have the following function, char* sample1() { char *p = "Israel"; return(p); } //in this case the memory storing india is not destroyed at the end of the function, indicating that it wasn't stored in the stack meant for the function call. However, the following function causes …

Member Avatar for Narue
0
135
Member Avatar for ghadahelal

hi all, i have a program that 'll take an Ip address from the user and 'll search this IP address in a file. now i open this file in binary mode. the IP address will be in this form 169.254.28.233 shall i convert this address into hex before searching? …

Member Avatar for Narue
0
145
Member Avatar for ghadahelal

h[I]i all ,[/I] [I]i have a program that read its input from a file in binary mode![/I] [I]now i nead to store this data and to compare it with another data.[/I] [I]which datataype can my input take.[/I] [I]also, the comapred stream is in this form 0004a4900[/I] [I]i made this stream …

Member Avatar for Narue
0
85
Member Avatar for stonecoldstevea

I need to validate the moduleCode by a do...while loop. But my code does'nt exit the loop - Not sure if I did right thing by declaring the string ABC111 before the loop - please help urgently using namespace std; // function inputAndValidate should be inserted here void inputAndValidate(string &moduleCode,int …

Member Avatar for stonecoldstevea
0
87

The End.