Beginners - May 2009 (Page 5)

by cantog
Difference between two class implementations
 
Hi, I'm reading som examples of class implementations, and hope that someone can help me out with understanding the difference between: Classname class...
[12 replies] Last: Ok I get it... so you can only allocate arrays whenever you have a con... (by tition)
by levone
"Expression: deque iterator not dereferencable" can't think of a fix :(
 
apparently deque iterators are not dereferencable... the code class Player { public: Player():points(0){} ~Player(){} void AddCard( std::deque<Ca...
[2 replies] Last: thanks :) im really loving these forums and community lol. (by levone)
by GameOn
(int)double where double's value when equals to int gives --int
 
heres my code int t1=min(x1,x2); int t2=max(x1,x2); fo(i,t1+1,t2){ y=m*i+c; if(y-(int)y==0) sol++; cout<<i<<" "<...
[2 replies] Last: oh sorry actually fo(i,t1+1,t2)==for(int i=t1+1;i<t2;i++) actually it... (by GameOn)
function prototype.
 
Hello.well,i'm a new forumer.i'm still new to the C++ programming and already got assignments that i could'nt think how to do it.So,i really hope that some of y...
[1 reply] : This is so basic there isn't much we could do besides just give you th... (by Duthomhas)
class function calling a function from another class
 
int main () { calls class1::test } class 1 { public: void test(); } void test() { calls class 2::test2 } class2{ public: test2() } void t...
[3 replies] Last: Hello.well,i'm a new forumer.i'm still new to the C++ programming and ... (by scorpion09)
Trying to complete a linked list (implementation file)?
 
Here's what I'm given: ********** struct Node { void* data_; Node* prev_; Node* next_; Node() { data_ = 0; prev_ = 0;...
[no replies]
by Beauti
Just Starting to Learn C++
 
Good Evening Everyone; I am just starting to learn C++ and I would like to know where to do I go to enable the numbers that show which line a code is written...
[2 replies] Last: Man That was so simple.... Thank you Helios (by Beauti)
calculate the number of calories in a sandwich
 
Hi i'm doing an introductory course in c++ and having a problem with this assignment: Write a program that computes the number of calories in a peanut butter a...
[1 reply] : You have the right idea, but you're not expressing it properly. Your ... (by helios)
by Lorena
About the C++ timer
 
So am trying to write a program that 'allows' the user to enter data for x-seconds, stopping the timer if this happens, and doing something else if this is not ...
[1 reply] : There is no timer in C or C++. The OS supplies one, though. If you ... (by Duthomhas)
txt application
 
how do I create an application that is capable of reading in from a text file (.txt extension) using "fstream"?
[2 replies] Last: I also recommend you look at std :: deque for storing the lines.... (by Duthomhas)
Value in array wont "delete"
 
Hello, I'm writing an abstract program that keeps a record of Names and Phone numbers. I've created a Record class that inherits a Name and Phone class. All ...
[4 replies] Last: Nevermind figured it out. I did this: List .setLast("DELETED");... (by grilledtuna)
Having a decent amount of trouble trying to seperate source files.
 
So I'm trying to do an example in C++ for Dummies about making a header file and I keep having problems compiling it. I'm using Dev C++ and I have three separa...
[9 replies] Last: OK. Maybe not too MS biased. The C++ Dummies All-In-One Desk Reference... (by scottintampa)
by levone
std::list random access iterator?
 
is there a way to use a random access iterator with an std list? since apparently a list won't allow access via array schematics.. i have to use iterators.. h...
[2 replies] Last: deque class then is what im gonna use. just did some test and it seem... (by levone)
Just started out learning C++
 
Hello. I'm new to these forums much like I am to C++. I'm likely to have many novice questions, and I apologize in advance for them. So, I'm just starting ou...
[18 replies] Last: Greywolf: - I didn't notice the dates either. It's only 10 days anyway... (by chrisname)
Random funtion???
 
Do you know are there any random funtions in c ? if yes, how can i use it?(rand () funtion)
[6 replies] Last: thank you so much for your answers... (by karalius)
Detect mouse movement?
 
I know I've asked quite a few questions on this forum, but, here's another. Hopefully my last for a little while at least. If anyone knows how to detect the ...
[17 replies] Last: It worked! Thanks! Now I'll add more colours and get my own little ... (by chrisname)
by audit
returning a variable's name as a string
 
Is there a function or a way to write a function that will return the name of a variable as a string? What I want is to create a function which when given ...
[6 replies] Last: Here's an interesting (?) variation: #include <iostream> #def... (by Hammurabi)
by easyz
building a spiral
 
i got stuck in building a spiral she has to be between 1 and 19 if i press 1 iget a spiral 4X5 this is what i managed to do: if (option==2) printf("Ente...
[9 replies] Last: any help ? what's the basic logic in building that ? how do I start ? (by moav)
Outputting random lines from a .txt file
 
Hey How do you output 5 random lines of text from a .txt file on C++ ? Thanks
[1 reply] : Sigh. http://www.cplusplus.com/forum/general/11237/ (by Duthomhas)
More 'standard' system("cls")?
 
I've been using system("cls") to clear a DOS window for a while now, but I don't want to use system() commands any more. Is there a more standard way I could do...
[19 replies] Last: Thanks for the help. The reason I printed fifty spaces several time... (by chrisname)
May 2009 Pages: 1... 34567... 21
  Archived months: [apr2009] [jun2009]

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