Beginners - March 2012 (Page 23)

by moot1
click the screen
 
In c++ is there a way to let the user like click the screen and make something happen in a reagular console program. Not graphics
[5 replies] Last: Yes. Check this: http://www.cplusplus.com/forum/lounge/65208/ In the ... (by S G H)
help with my tax function!
 
here is my program. thanks to everyones help im almost done! my tax fucntion wont work though. any suggestions? #include <iostream> #include <fstream> usi...
[1 reply] : Your using rate before assigning a value to it. It will contain rando... (by binarybob350)
New to C++ (<3 months of EXP) need help with RPG
 
I wanted to know if there's a simple way to constantly have a status bar constantly displaying at the bottom of the console window. I want it to display some us...
[18 replies] Last: in the console->run loop, do something like console->SetPositionText(... (by S G H)
by R N
Reading temperatures from file (Solved)
 
Hi guys. I am making a program that reads in data from a file that contains temperatures for City 1 and City 2. I need to use a prototype function to calculate ...
[11 replies] Last: Alright now this is my new code. #include <iostream> #include <fstre... (by R N)
Formatting output and Output text file issue
 
I am having trouble formatting my output into columns. Some of the the names are longer than others so it pushes the whole line out instead of lining up evenly....
[9 replies] Last: mKay, since all of your averages are of fixed length ( nn.nn) then the... (by Incis B)
Range based for or Boost foreach: can it be used with two containers?
 
Q1. Consider a scenario where we have two vector<int> conatainers of equal length, say f and s, and we have to do pairwise processing, ie work with the pairs f...
[7 replies] Last: Here is some fun I just spent time with. The idea with a ranged for i... (by Duthomhas)
by ACE123
string if statement
 
Hi, I am trying to open a bank website according to the name of bank entered. The bank name is stored as a string, s1. Later in the code, I try adding the if st...
[2 replies] Last: Thanks for that, it now works great. I thought I tried that, but maybe... (by ACE123)
How do you get input from a user as an object?
 
I'm trying to write this program from Deitel and Deitel HW9.5 . It's not required in the HW to get input from the user but I am curious how it is done? I didn...
[2 replies] Last: Thank you! I will give that a try tonight (by archangel95)
gross pay
 
I do not know how to write into words Gross Pay is $20.00 per hour. User tells you how many hours worked, you compute gross pay.
[1 reply] : You just wrote it in words. How do you write it in code? Like so: d... (by Stewbond)
The new guy
 
How do I work this? Health Insurance Premium is $500.00 plus $100.00 per dependent. User tells you how many dependents, you tell what the premium will be.
[2 replies] Last: giving someone the code is not really teaching them or helping expand ... (by ui uiho)
by seppel
x * y not equal to x.operator*(y) ?
 
Whats the difference between the two lines? const MC* mc3 = mc1->operator*(mc2); const MC* mc4 = mc1 * mc2; I thought they should be equivalent bu...
[3 replies] Last: Thank you guys! (by seppel)
I want to do C++ as a first
 
I have been completely convinced to do C++ over Java as a first language because ive been looking over all the websites and its said that C++ builds the best pr...
[8 replies] Last: Learning a programming language is only half the battle. If you want t... (by Taran Gadal)
Initializing a struct
 
Hi, just a little while ago I learned that it is possible to include the initialization for each element of a struct inside its definition. I think this is a ...
[11 replies] Last: 1) I know the code is just an example and therefor not intended to ha... (by cire)
Bubble sort two dimensional array
 
Ive been up all night trying to figure this out, it probably looks simple to most of you >.< void bubble(int oneChoice ,int i){ int temp; cout...
[4 replies] Last: You can do it in an understandable way, like that: Read the two-dimens... (by CosminNTG)
my code has got some bugs and dont know how to repair!
 
Hello there! I was creating a timer and i ran into some problems (well my code has two bugs) heres the code: #include <iostream> #include <ctime> #incl...
[5 replies] Last: Specifies the maximum number of chars to consume if '\n' is not reache... (by cire)
How do you append a file?
 
Can someone help me? In simple terminology please.
[3 replies] Last: When you open it for writing, be sure to use the app flag. http://w... (by Moschops)
how to save a specific variable
 
I would like to have a string but it will only accept input as one word i know this is a simple problem but can someone help? i have so far in this section #i...
[7 replies] Last: Try with: getline(cin,note); instead of cin>>note; ... (by S G H)
Returning a new object on the heap
 
Hi all, A quick one! In the following code line: virtual Mammal* Clone () {return new Cat(*this);} I understanding that a new object is being create...
[5 replies] Last: @zuluisgrate: You might be confused by the "*this", which is an object... (by Gaminic)
need help with void function and pass by refrence
 
Hello everyone, My Programing Assignment is to write a program that will take in the information on how may rooms will be tiled, how big the tiles are, and the...
[4 replies] Last: As your are passing those variables by value in the functions (except ... (by SUH)
to check whether the double no is divisible by 100 or not.
 
Im trying to execute the below program,but im getting error... can anyone help me to solve this problem... #include<stdio.h> int main() { double x; scan...
[3 replies] Last: Why not multiply by 10 (or however many decimal places you have time... (by NerdTastic)
March 2012 Pages: 1... 2122232425... 71
  Archived months: [feb2012] [apr2012]

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