Beginners - February 2009 (Page 20)

by ozan
Creating multidimensional array at class
 
Hi, My problem is that , I have two class, first class is generating only generating parameters(3 parameters M,N,Tap_Length). second class is genarating 3 ...
[5 replies] Last: http://www.cplusplus.com/forum/articles/7459/ (by Zaita)
by CKShia
For Loop + Arrays problem
 
I got a problem about the program... This is the sample output-> 1. Cars: AA11 Hours: 2 2. Cars: BB22 Hours: 4 3. Cars: CC33 Hours: 6 4....
[2 replies] Last: http://www.cplusplus.com/forum/articles/6046/ (by Zaita)
Template Class with pure virtual method
 
template<typename T> class A{ public: virtual void fun(const T&) = 0; }; class B : public A<int*>{ public: // Doesn't compile void fun(const int...
[10 replies] Last: You're right, there is no polymorphism at work here. I wanted to find ... (by spumilon)
How to find all possible combinations?
 
A number is called 'desirable' if all the digits are strictly ascending eg: 159 as 1<5<9. You know that your rival has a strictly numeric password that is 'desi...
[4 replies] Last: Those would be the permutations; then you'd just have to check for the... (by seymore15074)
new at c++ having trouble with a for loop
 
#include <iostream> using namespace std; int main() { int sum=0; int total=0,greatthan=0, lessthan=0; cout<< "Please enter 5 numbers\n"; for(i...
[3 replies] Last: Thanks for the help. It works just fine now. Simple mistake. (by ltrane2003)
by ismeth
Does not recognize namespace
 
Dear everyone, I am trying to compile the following sample code, but it keeps saying that it does not recognize System as a namespace. I have tried some other p...
[4 replies] Last: use /clr when compiling or one of the flavors: /clr:pure the proto... (by anders43)
All possible combinations
 
Consider how the numbers on a mobile phone's keypad are mapped to letters. Given a number as the input, generate all possible alphabetical strings that it can r...
[3 replies] Last: A thought for a recursive solution: A set of strings for a given numbe... (by Corpus)
Setting a user-defined class to NULL
 
I would like to declare an instance of a class, but set it equal to NULL and wait until later to initialize it with a constructor. This can certainly be done w...
[5 replies] Last: Does anyone know of a website that has the source code for any classe... (by helios)
Running a loop paralel with the other
 
I am writing a simple ascii game, where you move a char around the window and shoot a target. The game is inside a do while loop, which waits for you to press a...
[5 replies] Last: This has become popular only very recently. The general concept fo... (by Zaita)
by ozan
Uniform random number between(0.1]
 
Hi, I try to generate uniform random number between 0 and 1. I wrote this code but it creates only numbers at the 0.1***. Generated number always have 0.1 an...
[8 replies] Last: http://www.boost.org/doc/libs/1_35_0/libs/random/index.html (by Zaita)
The CIN buffer
 
I was working through some example programs in the C++ book I'm reading, and decided they are mostly crap because, while they address the topic in the chapter, ...
[5 replies] Last: The types introduced in sstream are only used for data conversions in ... (by Zaita)
by CKShia
For Loop + Arrays problem
 
I got a problem about the program... This is the sample output-> 1. Cars: AA11 Hours: 2 2. Cars: BB22 Hours: 4 3. Cars: CC33 Hours: 6 4....
[4 replies] Last: http://www.cplusplus.com/forum/articles/6046/ (by Zaita)
Overlooking a Simple problem, suggestions?
 
Im working through a book i bought learn C++ how to program 2003, and it seems most of the examples compile with zero erros or warnings, yet they dont flow corr...
[7 replies] Last: Using cin to get user input: http://www.cplusplus.com/forum/articles/6... (by Zaita)
by harryp
Array Size
 
Is there any way in which the size of array is assigned on the basis of user's choice? I know only variables of type const can be used for declaring array of a...
[6 replies] Last: malloc is a C style of memory allocation. better to recommend the use ... (by Zaita)
Using a String Value to Create New Object
 
I have created a very simple class Movie which allows several attributes of a movie to be stored and accessed, ex Title, Director, Rating, etc. I would like ...
[2 replies] Last: @Scipio: I'd avoid using a pointer initially. The OP been unfamiliar w... (by Zaita)
printing object of my objectList
 
hi everybody, i m having a problem of printing object of my objectList. In my objectList.hh file i have this: class stuffList{ public: voi...
[9 replies] Last: hey thanks mordekai actually i use your and it is printing the all dif... (by tukuniata)
by CKShia
For Loop + Arrays problem
 
I got a problem about the program... This is the sample output-> 1. Cars: AA11 Hours: 2 2. Cars: BB22 Hours: 4 3. Cars: CC33 Hours: 6 4....
[no replies]
by ozan
Pointer to a function in class
 
Hi I have problem at pointing to the function at the class structure. To demonstrate my problem,I have written a simple code. I have two function. ''Xsquare...
[1 reply] : Function pointers and member function pointers are two different t... (by jsmith)
how to remove all occurance from vector<string>
 
I have vector in class declaration which holds strings. vector<string> which contains strings like "test1" "test2" "test4" "test1" "test1" In this...
[5 replies] Last: Thanks you so much everyone .. really appreciate your help and guida... (by cppg2009)
Programming exercise
 
Problem Statement: Create a program that will only accept numerical inputs. After the input process, display the input string.
[1 reply] : Where is the problem? http://www.cplusplus.com/forum/articles/129... (by Bazzy)
February 2009 Pages: 1... 1819202122
  Archived months: [jan2009] [mar2009]

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