Beginners - February 2014 (Page 45)

Clear screen
 
Hello there, is there another way to clear the console screen other then system("cls"); or printing 50 lines? I would like to know because I don`t know w...
[5 replies] Last: In reality, I'd say that the best way is to simply not clear the scre... (by closed account EwCjE3v7)
Stop the creation of an Object
 
What I’m trying to do is if the denominator is zero, I want to return an error message and delete the object. I’ve written the error message, now I need it ...
[4 replies] Last: Thank you very much! I was able to successfully implement an exception... (by JRimmer)
by ndat
using a loop to get sum
 
I'm suppose to have them average out the sum_greater_than_zero/ (number of positive numbers inputted) and sum_less_than_zero / (number of negative numbers in...
[4 replies] Last: Thanks giblit! I was trying to do the second issue you told me about ... (by ndat)
Help with "while" loop structure.
 
Hello all, I am very new to C++ programming so please bear with me. Basically, the problem I am have with the code below is that I want any input other that 'w'...
[5 replies] Last: Did that make sense? you had an extra loop that you really didnt need ... (by sky3)
Class with constructors and set/gets
 
Hello I am confused on why my set function doesn't work. #include <iostream> #include <string> #include <cstdlib> using namespace std; class MovieD...
[3 replies] Last: Maybe they meant for two different movies. Movie movie1 , movie2; ... (by giblit)
Simple calculator
 
I am trying to write a program that mimics a calculator. I wrote this c++ code but it always give me the sum. Any help? #include <iostream> using names...
[6 replies] Last: Yes, that is my mistake. I changed it and I tried all different values... (by mickey4691)
Constructor and Destructor hw
 
I'm having trouble figuring out what i'm supposed to do. The question states "Create a new program, order1.cpp , with class , order, that contains only a con...
[2 replies] Last: Thanks (by stiches)
how to check for '\'?
 
This function returns the position of line where '\' appear. I tried '\' it woudln't compile i go to the ascii table and found out \ = 0x3c. but instead it's ac...
[2 replies] Last: The reason it probably didn't compile is that the backslash is used fo... (by giblit)
Recursive c++
 
Given an integer n>0, write a recursive C++ function that writes the integers 1,2,...,n.? #include <iostream> using namespace std; int d(int); int main() { ...
[5 replies] Last: Thank you all, especially @zsteve. I figured it out though. (by mickey4691)
Porting VC++ to Linux
 
Back in the 1990s I was surfing the internet, dial up(haha!), when I stumbled on a certain company's website who had given up on a clone of a major piece of sof...
[6 replies] Last: You should use Qtcreator since it is cross-platform and you won't have... (by bufige)
Simple arithmatic help!!
 
Write a program that reads in ten whole numbers and that outputs the sum of all the numbers greater than zero, the sum of all the numbers less than or equal to ...
[1 reply] : Well, what do you have so far (and what do you need help with)? Your ... (by long double main)
Analyzing a text file.
 
I have to a write a program for a class that analyzes a text file. It is supposed to count the total number of characters, alpha character (a-z), numerals (0-9)...
[2 replies] Last: Can you tell me if I'm starting to have the right idea? I found a way ... (by slomo93)
Error: No operator matches these operands?
 
Hey guys, I just started this assignment and I wrote the first bit of code. I'm trying to read data from the keyboard into the timeTwo variable, but I'm getti...
[3 replies] Last: Two things: first, you put parentheses around your object name on line... (by geniusberry)
Strings
 
I'm getting an odd result. What I'm trying to do is the following. I want to write what ever was entered into the constructor as an int, convert that to a strin...
[1 reply] : I found the solution on my own. Ignore the above question. I ended up ... (by JRimmer)
by S G H
Class Derivation Hell
 
I have a base virtual class who needs to be derived from two classes, who need to be BOTH derived from a single class. Example code: class Base { vi...
[1 reply] : You have two instances of Base class being dirived when it reaches the... (by giblit)
by kimi86
Link errors- first time user
 
Hi folks, I am building my first very simple package but got stuck with some link errors. Error look like this: Error 1 error LNK2019: unresolved external sy...
[2 replies] Last: thank u... that worked (by kimi86)
segmentation fault
 
I wrote a program that gets pointers that points at structures of potus that includes name, term and home state. the program then sorts the potus list from last...
[2 replies] Last: wow i cant believe i missed that thanks but i changed it to 50 but its... (by miamidawgs)
formatting
 
I'll keep this short, I'm on the last step of a program and the last part is to print a list I created "right justified 10 positions, with 8 numbers per line." ...
[1 reply] : use the format flag std::setw from iomanip library http://stackover... (by Smac89)
by Airyk
not sure if i'm on the right track for my "use" method for game
 
Okay, working on a project and could use some advice, not looking for you to write my code, so the way my Prof. explained the the getters and setters i believe ...
[4 replies] Last: Okay, so I was right with what I wrote, I guess I was just over think... (by Airyk)
by moreme
Perfect square prgram
 
Hey Guys, I just dont get the result that I want, this is a perfect square program but any number that is given to the program it returns not a perfect square,...
[5 replies] Last: Thanks guys all of your ideas were so useful. (by moreme)
February 2014 Pages: 1... 4344454647... 60
  Archived months: [jan2014] [mar2014]

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