Beginners - November 2010 (Page 4)

by firix
class template has already been declared as a non-class template
 
Hi I can not run this code. template<class T> class SimNode{ T data; int link; public: friend class SimSpace; friend class SimChain; }; t...
[no replies]
by MeLB
Lottery Program (doesnt work) C++
 
A lottery ticket buyer purchases 10 tickets a week. always playing the same 10 5-digit "lucky" combinations. Write a program that reads the numbers from an in...
[4 replies] Last: My problem is -It started out to RUN but then after running it would j... (by MeLB)
Class ... has no member.... What?
 
So I'll assume you don't have an answer to my splitting linked list problem. Okay. Thanks for trying. But this is really starting to get on my nerves. Der...
[2 replies] Last: Thanks for the response, but it's not a function in the derived class ... (by Erdrigard)
Moving an array and adding a value
 
I want to move values of an array to the right so that a user inputted value will fit in the user desired location: This is my program so far, its not finish...
[3 replies] Last: Right I have cracked it....heres the final program encase anyone else ... (by acesouthall)
by cstorm
skip to function?
 
I am somewhat new to c++. I been using gaming programming(level editors, scripts, etc.) for some time but i've recently taken a c++ prgramming class in highsch...
[1 reply] : Uhm as a fellow c++ beginner I beleive I might be able to help you :D ... (by Faff)
Confuzed with braces please!
 
Hi, could someone please tell me the difference between the two below peices of code: cout << "\nCounting forward:\n"; for (int i = 0; i < 10; ++i) cout <<...
[6 replies] Last: ha, how daft of me. Thanks (by TpOreilly)
Translating arrays with pointers to code
 
I have this defined at the top of my code: int map0 = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0}; int map1 = { ...
[no replies]
by chipp
typedef
 
i got this code: class Cell; typedef Cell* Link; //that means that Link is equal to Cell*, right? //blablabla... Link& newlink() return {some_var...
[3 replies] Last: Link& is a reference to a pointer. It works the same way as a referen... (by jsmith)
STL Container
 
Which STL container is most appropriate to store telephone records?
[3 replies] Last: I would suggest an std::set. A set ensures that there are no duplicate... (by Albatross)
by Omani
Cos(x) Funtion
 
hello , how can we write this function in c++ .> ?! plz c the picture .. http://www7.0zz0.com/2010/11/28/15/337827554.jpg .. ..
[1 reply] : You could just use cmath. They already did it for you. :) http://cplu... (by Albatross)
Compiling allegro
 
I'm trying to compile a program I've just made with allegro with Dev-Cpp. At the moment I've linked it through Project >> Project Options >> Parameters >> Linke...
[1 reply] : We've deprecated Dev-Cpp, but if it works on your system, then... a... (by Albatross)
Array of pointers to arrays of ints?
 
I have an array that I want to put a bunch of arrays into. I made the big array an array of type int * so it could point to the other arrays, like this: i...
[2 replies] Last: I did that, but I still have the same problem with the arrays and poin... (by garlandman)
Loops + continue function problem
 
Hi C++ers, I'm new to this website as I've just begun to take C++ courses. Anyways, I have a few problems I would like to ask for some opinions about. Fir...
[2 replies] Last: Ohhh, thanks!!! I got it to work by replacing return main() with my ci... (by sklim93)
Declare of function default value
 
Hello, This is a simple question, however I can't find the answer on the net. I have this code: #include <iostream> using namespace std; void my...
[2 replies] Last: ah the closest try I had was to put (int x = 3) for both declare and d... (by force123)
.exe wont open on other computers
 
Hi, i've just finished a project (im a beginner ) i think its pretty cool, it constructs the equation of a line with only a slope and one point. Anyway, when i ...
[4 replies] Last: so which build should i send and how? also, what if its on school co... (by closed account 23ADSL3A)
private-public members:S
 
when i try this code it gives several errors:S i did all of declarations in public but again i take these errors; i did public to node but i didnt work Erro...
[no replies]
by kaliuz
Question about C++ and OOP.
 
Hi, i'm new to C++ and OOP, so I have a theorical question. I have a class that will be used only once in the entire program. This means I will instantiate...
[2 replies] Last: Instead of a class with all static methods you should use a namespace ... (by Bazzy)
The point of Data Structrues?
 
What is the point of Data Structures in C++? And yes I know how the stack and heap work.
[2 replies] Last: Data structures are needed to keep similar informations in a single pl... (by Bazzy)
by Faff
How to make prog read 2digit numbers?
 
Hello :) I want to make a program which asks a number and then executes the tasks linked to that number, but I'm having a hard time figuring out how to read ...
[5 replies] Last: Hmm , I'll supppose I'll do it that way then :) Thanks ^^ (by Faff)
extraneous `char' ignored problem
 
The following function compares the two numbers and if large > small displays the text in the chosen color. Then returns color to original light grey. However, ...
[3 replies] Last: I finaly found the problem. I had named the variables large and small.... (by kkostas)
November 2010 Pages: 123456... 42
  Archived months: [oct2010] [dec2010]

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