Beginners - April 2017 (Page 25)

upper_bound & lower_bound
 
I need to write the function upper_bound & lower_bound manually ,not to use ready-made... I did something like this )) Where is the error ? int upper...
[4 replies] Last: JLBorges thanks for the help (by kizhvac kampazitr)
by Drakk
Structure arrays and functions
 
Write your question here. Well I am trying to create a Structure array of that is populated by the function below and prints out using another function in a ...
[1 reply] : see this link re returning local array's from functions: http://stacko... (by gunnerfunner)
***How Can I Loop Interval Number Of Times ***
 
Team, I block commented at the bottom kind of what I need to see. Here's where I am lost - I know how to do a do, while and an if loop. But I'm confused on h...
[4 replies] Last: Hi, shycas2008, I’m likely to be totally misunderstanding you questi... (by Enoizat)
how to do this code without string
 
Create a file ​sentence.txt​ which has data like given below. sentence.txt He was in pressure but nobody helped him. You are required to write a pro...
[3 replies] Last: because we haven't done strings yet there's got to be a better reaso... (by gunnerfunner)
Ladders* - pls help
 
You have N equal little cubes. You can stack several cubes on top of each other to build a tower. You can also place several towers next to each other to build ...
[2 replies] Last: Thanks ! wrоte like this #include <iostream> int NumberOfLadders... (by kizhvac kampazitr)
Tic-Tac-Toe: Validating whether position has already been taken!
 
I am trying to make the player have to try to select a position again if a spot has already been occupied previously by Player 1 or Player 2. I am not sure why ...
[4 replies] Last: Something along these lines, perhaps: #include <vector> #include <io... (by JLBorges)
Mix sdl2 trouble playing multiple sounds simultanious
 
Hello, I'm having some trouble playing music and chunks at the same time. I wrote a frequency change function that changes the frequency for either music or...
[5 replies] Last: The frequency is the sample rate. When you call Mix_LoadWAV or Mix_L... (by Peter87)
Using 2D array and calling it.
 
I am needing it to store *, which is INITIAL because of enum, in the board which is 5x5. Like this, ***** ***** ***** ***** ***** #include <iostream> #inclu...
[1 reply] : See: http://www.cplusplus.com/forum/beginner/212775/#msg994053 (by JLBorges)
How to create and use a 2D vector within a class?
 
Hey guys, I am trying to get into the swing of Object Oriented Programming and with that said, I am making a Tic Tac Toe game just for the fun of it but I'm try...
[2 replies] Last: JLBorges, Strange because I tried exactly that type of initializing a... (by MisterTams)
Trying to write to a .exe
 
I am trying to write to a exe and have the program verify as it goes but I keep getting the find window error even if the name is correct #include <iostr...
[1 reply] : > I keep getting the find window error even if the name is correct T... (by JLBorges)
by Elize
Can't assign const base class members in derived class
 
I've been out of the C++ game for a while and now I'm suddenly blanking on basic concepts. I've got an ordered list of classes that each store the same things a...
[1 reply] : class A { protected: const int _a; public: A(int a = 0) : _a(a) {} ... (by cire)
Vector subscript out of range when looping backwards
 
Hello there! To be honest, I'm in a bit of a pickle. Have you ever looped through a vector, only to be struck by a vector subscript out of range? Well, if I'm n...
[2 replies] Last: These do indeed work. Thank you. (by CrazyCollegeGuy)
How to parse a string into a vector<int>
 
I was wondering how to convert a string, say "1234" into a vector, say vec, where vec = 1, vec = 2,... and so on.
[2 replies] Last: Thanks!! (by MoZeeba)
Need some help with a program
 
I need some help with writing a function/module for the following program that passes in both parameters (number of rows and columns), I also need to get it so ...
[2 replies] Last: Hello aaronf89, You can start with this: http://www.cplusplus.com/doc... (by Handy Andy)
User Domain in class project
 
Hi everyone, I'm new here. I wasn't sure where to ask this, I figured someone here on this forum might be able to assist. I am working on a group project that...
[no replies]
Code validation (toupper) within an array
 
First post be gentle. I have two arrays I need to validate. I need to either check if the first letter is capitalized or just change each first letter to capi...
[16 replies] Last: jlb- Thank you this program now works correctly. If anybody else has... (by viorage)
Function decomp
 
Hey guys so I wrote my code for an assignment and it compiles, for the most part everything works except it will not calculate percentages correctly The outp...
[3 replies] Last: Hello cristina999, Glad it worked for you although I do not know why ... (by Handy Andy)
Positive and Negative, Even and Odd
 
So I'm writing a program that asks to input an integer and the program tells if it's odd or even, negative or positive. For some reason, it'll get the pos/neg p...
[3 replies] Last: positive, negative, Even and Odd do not work for INT. Remove all th... (by celticqueenkira)
Can't break out of loop when user tells the program to exit?
 
I am writing a menu based program where the user chooses from the menu what to do with an array. The last option is to exit the program, but when I run the prog...
[3 replies] Last: Hello, late reply Sorry but i found your bug, the bug is very simple s... (by frederickrl)
Help with functions in class
 
Hi there, as below code, I am having difficulty with display function. As you can see that, I have use while loop to scanText() then included processText() f...
[2 replies] Last: Thanks so much (by jimkayle)
April 2017 Pages: 1... 2324252627... 34
  Archived months: [mar2017] [may2017]

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