Beginners - March 2016 (Page 36)

by Ch1156
How to create a class that can use the same function to show different messages
 
I want to create a class that can use the same function to show different messages from the program, like error messages to show in the console using one output...
[14 replies] Last: Ok, some pseudo code. As mentioned earlier, I recommend a std::map f... (by TheIdeasMan)
Accessing derived class within the base class
 
I've been messing around with inheritance this afternoon trying to do some examples to get a feel for it. I came up with a sample scenario of a pizza shop. Cust...
[13 replies] Last: As mentioned in my PM reply, I am making a reply here. I don't wish fo... (by TheIdeasMan)
zipcode to barcode conversion
 
i need to write a program that asks the user for a zip code and prints the bar code. Use : (colon) for half bars and | (vertical bar) for full bars. I'm extr...
[1 reply] : This code which I just wrote doesn't check whether the ZIP entered is ... (by jgg2002)
Converting height from decimal to wholenumber int
 
How can i change a persons height form decimal format in c++ to a whole number int. an example would be a 6'4 person would be 6.04 and i need to convert that de...
[7 replies] Last: Thanks jgg2002 it worked perfectly I appreciate the insight. (by infinity)
cin.getline function
 
I was just wondering if anyone could explain the cin.getline function in a way I can understand. My book and the tutorials I tried using did not explain it ...
[1 reply] : There is an another Skywa^H^H getline : http://www.cplusplus.com/refe... (by keskiverto)
how to call the display method on the main function?????
 
class Humanresource{ public: class Employe{ public: void display(){ cout << " your are an employe " ; } };
[1 reply] : #include <iostream> #include <cstdlib> #include <string> using names... (by Thomas1965)
by nj1995
issue with putting char type into stack
 
Hi, my program seems to run fine, except for when it I attempt to insert random char types into the stack, where nothing happens and I am unsure why this is, an...
[1 reply] : Stack<char> stk2; srand(static_cast<unsigned char> (time(0)));... (by Thomas1965)
reading a file data into an array of a struct
 
Hello! I kinda need help on how to read a file data into an array of a struct type. I did google guides but i still cant figure it out. I will show what i have...
[1 reply] : May want to look at the code I posted here - http://www.cplusplus.com/... (by megatron 0)
by BenW
Getting incorrect output for Parallel Circuit resistance
 
Hi all, I'm having trouble with—I believe—getting incorrect output from the second part of the bool statement here. The code's running, and I believe the...
[2 replies] Last: Lol oh man. Yeah that fixed it. Thanks so much! (by BenW)
Stack
 
....
[5 replies] Last: As I suggested above, std::vector is safer to use. A std::vector has ... (by AbstractionAnon)
Need help on array initializiation (Class attribute)
 
Hi, I recently started a personnal project : A Match-3 type of game (Where you match 3 of the same type and they go away). I am aware I might not be able to ...
[2 replies] Last: Yeah, that's what I did and It worked, thanks mate ! (by Viiarge)
Cant Type At Certain place when i run the project
 
Hi I am new to C++ and programming in general, Ok so when I run my project and come to the question would you like a quiz? I can not answer it I don't know why ...
[2 replies] Last: Oh yes thank you so much. (by Gamingmayhem)
Need some help with strings
 
...
[2 replies] Last: Thanks a lot! Its working perfectly now. (by aquapollo)
by Areey
About series....
 
Hello, may someone tell me how to approach this problem: write a program to find e where e=1+1/2!+1/3!+1/4!+.....1/n!. I'm struggling with since i was absent du...
[4 replies] Last: I think it works! yaaay int main()[ { int n, i; double factorial = ... (by Areey)
Assigning to an array of 2D arrays from within a function using "std::copy"
 
I have an array of 2D arrays which I'm trying to initialise from within a function I'm doing this for a simple board game I'm trying to make, which has three l...
[7 replies] Last: Ah, yes those were exactly the things I had in mind: Ah! It's just a... (by TheIdeasMan)
Large unique random number generator
 
Hi all, I want to generate any random integer from 1 million to 30 million, so here is the code I've written. #include <iostream> #include <cmath> #incl...
[6 replies] Last: I want to generate any random integer from 1 million to 30 million Y... (by Chervil)
Sorting parcels (a 2-dimensional array) (1,2)
 
Hello everybody, for a school project I need to develop a program which reads a number of coordinates from a .txt file something like this: 3 //number...
[31 replies] Last: It's a tough question. And you are right: the hard part is telling th... (by Duthomhas)
How to handle argument params in C++
 
So I'm a C++11 newbie and I'm having some difficulties with manipulating the number of params of an argument when passed to a function. Let's say I have some ba...
[3 replies] Last: The IDE will have some place where you can set command line parameters... (by kbw)
Maze game error
 
Hey, I'm pretty new at this and I have this maze game I'm making on C++, and every time I try to run it whilst debugging, the same 3 problems come up with the e...
[3 replies] Last: Initialize them. Set their game state. Set their position. Otherwise a... (by theturk1234)
For pair numbers
 
Hello ! So i got a homework in which i should make a program using "for" and it shall calculate addition of pair numbers. I can't figure it out and i tried seve...
[1 reply] : If you have it, please post the exact wording of your problem.Otherwis... (by theturk1234)
March 2016 Pages: 1... 3435363738... 47
  Archived months: [feb2016] [apr2016]

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