
please wait
by zmarchbank
How to get object name from within class methods
|
I'm working on a project in my programming class that you're supposed to make a .h and .cpp file that you can set values of an array, get values of an array, pr... |
Apr 24, 2013 at 12:49am
[4 replies] Last: Okay, that's kind of what I thought. Thank you! (by zmarchbank)
|
by Aquacold
ofstream saving extra lines
|
I have been writing a flash card program and have just got to saving and loading data. The program currently takes data from a file a puts it into the program b... |
Apr 24, 2013 at 12:44am
[2 replies] Last: Thanks a lot man! After I changed that I realized I had a double "<< e... (by Aquacold)
|
Question about C strings |
What exactly does this line mean when we use it with c strings? stream.getline(variable, max_size); |
Apr 24, 2013 at 12:34am
[3 replies] Last: thanks (by closed account LN3RX9L8)
|
by karl kho
C++ problem. Converting integer into a String based on digits
|
This problem is really simple. I want to convert the integer into a string. int x = 693; char chararr ; in my homework, x is unknown. but dont wo... |
Apr 24, 2013 at 12:31am
[6 replies] Last: Ok. So you can do exactly what you want with this code: #include <io... (by Zaita)
|
by i2Fluffy
Passing an Array of Structs to a Function
|
Can someone point me in the right direction? I'm a beginner but i'll try to explain this the as best as I can. How can I edit specific fields from my struct in ... |
Apr 24, 2013 at 12:21am
[1 reply] : Arrays are by default passed through as a reference instead of a copy.... (by Zaita)
|
by SlenderMan
Using loops
|
A section in my code needs to ask if you want to add, subtract, or exit. I cant get it to keep looping as long as you don't want to exit. What is wrong with thi... |
Apr 24, 2013 at 12:11am
[2 replies] Last: Also, your if statements never break, so it will never actually exit o... (by Ispil)
|
by TaytayB
Exception Handling
|
My code seems to work fine for the maximum size, which is 39, but not for the minimum. Problematic function: void Diamond::SetSize(const int diamondSize)... |
Apr 24, 2013 at 12:06am
[2 replies] Last: Well, for one, you're trying to manipulate the value of size- which is... (by Ispil)
|
by SlenderMan
Problem with class.
|
I have this code where I need to add the inches and feet together to 1 number. I have to use int CDistance::add(const CDistance&) const to do it though. But whe... |
Apr 23, 2013 at 11:53pm
[5 replies] Last: http://www.cplusplus.com/doc/tutorial/functions/ http://www.cplusplus.... (by Zaita)
|
by kyranstar
Deleting a class stored in a vector
|
I have class called Entity that I have to dynamically create, so I store it in a vector called EntityList. I am trying to make it so that when I get a certain i... |
Apr 23, 2013 at 11:46pm
[2 replies] Last: You cannot use delete this; because this will cause undefined behavi... (by Zaita)
|
by Damikas8181
Problem with inialization: for Class
|
How do i initalize output1 and output2? #include <iostream> using namespace std; //Conversion from feet to meters; conversion1 = 0.3048; //Conversion f... |
Apr 23, 2013 at 11:38pm
[1 reply] : You have more problems that just this. You're not passing the values a... (by Zaita)
|
by ninthred
convert 4 letter words to love
|
okay so im writing this program that is suppose to convert any 4 letter word in an input to love, Love if its the first letter of the sentence. For example if i... |
Apr 23, 2013 at 10:16pm
[6 replies] Last: I'm sure there is a much easier way to do this...but this seems to wor... (by giblit)
|
|38| error: invalid use of template-name 'tnode' without an argument list| |
Why can't I create a new tnode in the bstree (Binary Search Tree) class? TNode.h------------------------------ #include <iostream> #include <cstddef> #inclu... |
Apr 23, 2013 at 8:33pm
[10 replies] Last: I still can't figure it out. (by Jaskiratpal Singh)
|
by Ludidi
list positive numbers
|
i stuck on b n c A list of positive numbers is read into an array from the keyboard. The list finishes when a number 0 is typed from the keyboard. a. Find ... |
Apr 23, 2013 at 8:31pm
[2 replies] Last: You obviously can spot the above and below values and you do know each... (by keskiverto)
|
by Daleth
Pros and Cons of a range-based for loop.
|
So far, the only pro I read about range-based for loops is its legibility, which I find questionable, because, to me, the syntax looks more vague than helpful. ... |
Apr 23, 2013 at 8:28pm
[6 replies] Last: Thanks everyone for sharing your thoughts. I'm starting to understand ... (by Daleth)
|
by Hp of Legend
Trouble using the getline function in do/while loops
|
I'm creating a program that allows you to enter up to 100 books and the books information such as Title, Author(s), Publisher, ISBN, Cost. I'm using the getlin... |
Apr 23, 2013 at 8:20pm
[3 replies] Last: For that question, on searching the array, I think you will need to po... (by Chervil)
|
by snailtier
Printing data from a file
|
Hello! I copied data from a structure into a file, but I am having trouble figuring out how to print the date from a file, since I can't just create a for loop ... |
Apr 23, 2013 at 7:28pm
[no replies]
|
by Devra
It shuts down!
|
Hi everybody. I need help with this program. It shuts down, i'm using Microsoft VS. It's C++, isn't it? I think yes. #include <iostream> #include <cmath> #i... |
Apr 23, 2013 at 7:20pm
[1 reply] : Look at: http://www.cplusplus.com/articles/iw6AC542/ (by firedraco)
|
Problem with Custom Exception |
All, I need to create a custom exception called "IllegalSubscriptException" for a function called Rational that should let the function operator throw this ... |
Apr 23, 2013 at 6:40pm
[3 replies] Last: does not work is not an error message (by ne555)
|
by jnf102
error
|
what did i do wrong #include <iostream> #include "conio.h" #include <string> using namespace std; int Addition(int x, int y); int Subtraction(int... |
Apr 23, 2013 at 6:27pm
[3 replies] Last: Line 15 the t in mathtype should be uppercase. Line 22 the t in mathty... (by Yanson)
|
by tony47
cannot find ISDL-ttf
|
Hi everyone, I'm learning about lazyfoo's tutorial,here's my small problem. I'm using dev c++, I downloaded the ttf file and set as below: tools-> directo... |
Apr 23, 2013 at 6:26pm
[no replies]
|