Beginners - September 2010 (Page 21)

If Else dealing with percentage
 
help with c++ problem. Thank You!!!!!!!! a software company sells a package that retails for $99 . Quantity discounts are given according to this table. Qu...
[4 replies] Last: georgewashere (6) It worked. I was entering 1 to test when I should ha... (by wendy001)
is it possible to work this code w/out the char array?
 
As the title says, would I be able to do this if say, grade were a string ? #include <iostream> #include <string> #include <cstring> using namespace ...
[5 replies] Last: This is somewhat unrelated but... grade = ++grade ; This li... (by Disch)
Simple codes for a unique program?
 
Is there a simple code I can add to our exercises in our programming class to impress my instructor? Just to be different from my classmates programs? Like, put...
[3 replies] Last: Yes, I didn't quite like the phrasing, either, but I didn't feel like ... (by helios)
[deleted]
 
Accidentally hit the submit button twice. Sorry. Please delete this post.
[no replies]
Loop Causes Crash
 
I have this code (for the Dungeon Crawler exercise): #include <iostream> #include <time.h> //Both of these are needed for Code::Blocks to use rand #includ...
[2 replies] Last: I don't know how I made that mistake, thanks. Although it seems to hav... (by MottMan)
How to open a variable filename with ifstream
 
In a new and supposedly improved version of a scheduler program I am working on, I have encountered a problem: I need to open a file specified by the user. How ...
[5 replies] Last: Found the problem: I'm an idiot. forgot to include the fstream libr... (by Some new cpp programmer)
Resetting an input file pointer with seekg
 
So I have a function to detrermine the number of lines in my program. It does this by taking an ifstream& object as a parameter, and using getline( ifile, dummy...
[2 replies] Last: I see. I have it working now, thank you. Take care. (by closed account Lv0f92yv)
Question about classes
 
In my C++ class I am working on an assignment where I am supposed to create a class that represents accounts in a bank. I am told to create a data member of typ...
[2 replies] Last: Urgh... this is all still confusing me. I set up an appointment to mee... (by kultrva)
adding content into an array
 
now i know how to add content into an array normally. what i need to do is, add content to an array. if that slot is already taken up, i need to implement a lin...
[1 reply] : Use an array of linked lists. http://en.wikipedia.org/wiki/Hash_tabl... (by ne555)
Can someone explain more clearly about passing by pointer?
 
Hi, I have read several web pages about passing values using pointer. But I do not get to clear grasp of how to do this. The following code is a template ...
[4 replies] Last: Thanks Disch, Now I get it. (by crazyjji)
Can't use getline without overloading
 
Heya! I'm looking to use getline to read some input from a file but VS keeps telling me it can't do it and I'm looking at a similar program I typed in the past ...
[2 replies] Last: I'm an idiot! Thank you. :) (by Kulingar)
about fflush()
 
Hello.i was trying to make a simple menu using 2 switch case's..and all was ok until i had to read my options from the keyboard..the first read was ok (1 or 2)....
[1 reply] : http://cplusplus.com/fflush And you might want to try using fflush(... (by kevinkjt2000)
String type not recognized
 
class question { private: std::string question; std::string option ; int corr_op; public: void cons_in(); void cons_out()...
[3 replies] Last: You're including your headers in the wrong order. #include <string>... (by Disch)
cin.getline is not working
 
I am trying to do an assignment for class, but I cannot get this code to work. When I run it, it works fine up until it asks for the name of college...it skips ...
[8 replies] Last: I tried what blackcoder and galic said, and the compile errors are go... (by blackcoder41)
Sucesive calls to cin fail
 
I have a C++ program that calls for user input (integer) at two different points in the program (cin >> variable1, cin >> variable2). The first input is success...
[1 reply] : cin.ignore(somelargenumber); //Clears the stream so that it has to as... (by Albatross)
by jagoly
what is .obj for
 
noobtastic question: I keep all my source code and executables in one directory (for now) for easy command-line access. when ever i compile something with my...
[1 reply] : http://en.wikipedia.org/wiki/Object_file (by Null)
by jagoly
message error when non no. used
 
I had this posted on the end of one of my other topics, but it was out of place. in my quiz, if the user enters anything but a number, the message [Please type...
[2 replies] Last: Thank you so much!! it finally WORKS!!! note (line 8): cin.ignore( ... (by jagoly)
WindowProc
 
wc.lpfnWndProc = WindowProc; So I thought that WindowProc was a function and that it needed to be called like WindowProc(); with some variables inside....
[3 replies] Last: When you use the name of of a function (without parenthesis), a pointe... (by blackcoder41)
by airowe
"Must have class/struct/union"
 
This program is attempting to populate a vector of cards, shuffle them, and then deal them. I'm getting the following error message: .\cardTester.cpp(37) ...
[2 replies] Last: class Card { public: static int suit; //static? all the cards hav... (by ne555)
Another Program Exercise (noob) having trouble with solution..
 
**I can't figure out how to subtract one from my char array... If someone could help me out, or post a more convenient solution to this problem (i'm pretty sure...
[2 replies] Last: I actually managed to figure it out thanks to your tip LB, it was act... (by georgewashere)
September 2010 Pages: 1... 1920212223... 32
  Archived months: [aug2010] [oct2010]

This is an archived page. To post a new message, go to the current page.