Beginners - November 2016

by Jt1218
Array passing to function
 
Can anyone please show my how to take the prices in this program and place them in an array and then pass them to the function. #include <iostream> #i...
[no replies]
LOGIC for Distinct Numbers is wrong...help!
 
I am a beginner struggling with the very last homework question for semester! Test on Friday and I was hoping to study this question for the array section. ...
[10 replies] Last: Sorry about that. I get it now. Thank you so much. (by rdigney)
getting the surface of a cube with define
 
I'm trying to define the formula for the surface of a cube and than to call it in the code but I have a syntax error on the calling line. I think maybe i should...
[4 replies] Last: that's it thank you very much this cplusplus site rules :D :D :D (by spax1111111)
Initializing diagonal of 2d array?
 
I have an array that only shows the bottom left, and most of the diagonal is blocked out. It looks something like this: 0**** 1**** 12*** 385** 4679* ...
[3 replies] Last: OK, here's an outline. - Declare your initial matrix array and put ... (by lastchance)
Using getline for menu selection
 
So I am trying to create a menu system with a while loop, and the input to make selections for the menu has to be a string. To quit, the user types "quit", but ...
[no replies]
About Functions?
 
I am fairly new to c++ and I just wanted to know when to use functions and what's the point of using them. Can't you just put everything in "main()". How would ...
[1 reply] : I just wanted to know when to use functions - When you want to do t... (by AbstractionAnon)
by aLee15
Merging Two Lists Together?
 
I have to input two lists and then merge them together that lists them in numeric order. I must use this formula within the code: void merge(const int list1 ...
[3 replies] Last: To solve the first issue, how do I ask for more inputs? By asking fo... (by cire)
ASCII columns
 
I have this code that outputs ASCII code in columuns. But the order of the numbers comes in rows, 32 34 35 36 37 38 39 40 41 42 43 44 45 46 47 etc. But I want i...
[3 replies] Last: cout << a << setw( 2 ) << static_cast<char>( a ) << setw( 20 ) << ... (by koothkeeper)
Taximeter
 
Hi First of all I'm very new to c++ and I'm want to write a program that works like a taximeter. First you put in a time in hh:mm and then a end time in hh:mm(...
[1 reply] : Hello markusfurst, You have a good start. You will wan to look into h... (by Handy Andy)
by cm123
really simple array
 
how do you create a function that passes in an array by value and the subscript and returns the value of the array at that subscript.
[2 replies] Last: /* Assuming the array contains integers: */ int getAt( int ... (by koothkeeper)
by kmce
cpp files and header
 
Can someone simplify the type of information that should be stored in either of these. I think in cpp it is such things as functions that are stored, but i keep...
[1 reply] : Hello kmce, Beyond the usual header files that you include in a progr... (by Handy Andy)
by roots
Passing data to a class.?.?
 
In a program I am editing there is a ProductionWorker class and an Employee class. Production Worker seems to be inherited from the EMployee class. Employee cl...
[13 replies] Last: So, looking at this: Create ProductionWorker object by passing all t... (by MikeyBoy)
Allocation Detail
 
I need to declare and initialize a vector as a field of a class named PixelOperator. There are 2 ways to declare it: 1. vector<int>* field = new vector<int>(...
[1 reply] : I need to call delete in the destructor of the class not if you use ... (by gunnerfunner)
can i please get help with this code
 
Write a C++ program that lets the user play the game of “Rock, Paper, Scissors” against the computer. Divide the program into functions that perform each...
[1 reply] : Sure what do you need help with ? (by SamuelAdams)
Having alot of Lists in a program
 
Hello guys, I wrote this program today that actually took a whole lot of time. However, i did use alot of lists and arrays(although I dellocated the dynamicall...
[5 replies] Last: First off, I would like to apologize for the late reply My program is ... (by ahmedkhalifa)
Random number between 1-6
 
So I'm writing this program that let you roll a dice and show you the random number, but I want the program to show how many 1,2,3 etc that you get when you rol...
[2 replies] Last: Nothing more to add. Except maybe to use std::bind() from <func... (by boost lexical cast)
Roll a dice
 
So I'm writing this program that let you roll a dice and show you the random number, but I want the program to show how many 1,2,3 etc that you get when you rol...
[9 replies] Last: Well, I was trying to keep the OP's base design. Apologies! Couldn'... (by lastchance)
vector string order
 
My program is almost done, the only thing i need to do is order the names alphabetically as they are being printed out. I made this function... void chec...
[8 replies] Last: //Aide pour vecteur #include <iostream> #include <vector> #include <s... (by yushi170)
Words in array
 
Hello I am a student in need of help. The problem I need solved is this: Input 20 words and then output the words and count how many times each word has been i...
[5 replies] Last: Yes I have enablede support for c++11 thank you for the help! (by zerkas101)
multiplying two vectors
 
here is the thing i want to create two vectors and through "FOR" insert the values and then multiply them both with each other. that is my try pls help int...
[5 replies] Last: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa it work's you saved my I almost lost my... (by spax1111111)
November 2016 Pages: 123... 44
  Archived months: [oct2016] [dec2016]

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