General C++ Programming (Page 8)

Dice c++
Hello! I have a c++ assignment, im supposed to make a program that will throw 6 dices then find out ...
[1 reply] : Are you supposed to be using arrays for this assignment? I see you hav... (by Ganado)
by dean
Reserve space in the stack for an unitialised object
Hi folks, what's the best way to reserve some space in the stack for a uninitialised object. For exa...
[8 replies] Last: @doug4 ah right =) @seeplus due to optimisation reasons, already prof... (by dean)
Locker Game
Imagine a high school hallway with n lockers and n students. Now imagine a single student walking d...
[18 replies] Last: what does vector<bool>& mean? I am confused why it has to be a vector... (by doug4)
2D Arrays
Hi people I just started doing c++ and Im instructed to do this without any background hope you guys...
[2 replies] Last: Why printf() and scanf() - these are c functions. Have you come from a... (by seeplus)
by ngb123
handle reference of struct instance inside class
Hi! I'm having some troubles to handle different struct instances inside a class. In summary, the e...
[2 replies] Last: Now the problem is that my StepperHandle instances x,y,z are not hand... (by coder777)
by chxx
Can you help me with this c++ structure?
I'm trying to write a structure where i ask to the user how much students he wants to register. Then...
[6 replies] Last: Seeplus, that's a good version, thanks for writing it. (by chxx)
Confused about returning by reference.
How can I safely return a reference to an object?
[6 replies] Last: Okay. Thanks a lot! :D (by SirEnder125)
Replacing letters
So i want to replace letters to adaptate my letter language, i made a program but when it replaces l...
[8 replies] Last: if you are using char, and there is more to it than 10 or so letters, ... (by jonnin)
Encryption Program Issue
I am having issues with a while loop in an encryption program. When I try to execute this piece of c...
[19 replies] Last: @jonnin, Thanks for the warning! I am careful, because I know what ca... (by agent max)
Work with array
There is a code: statistics.h contains two function declarations: meanTime - Returns the aver...
[4 replies] Last: Your sum won't fit in an int for those sort of values of n. use unsi... (by lastchance)
Use of opencv waitkey() with C++
I'm trying to display the webcam feed with a timer but it doesn't render smoothly. Here is the code ...
[1 reply] : rtfm (by ne555)
proxy Undefined type error
Hello everyone, I have been working on this for two days. I've been Googling a lot and couldn't co...
[3 replies] Last: You're welcome! Glad I could help. (by MikeyBoy)
Strange compilation error
Hi, In the example below, I use 2 "dummy" classes (LoKey and HiKey) to choose between 2 constructors...
[4 replies] Last: C++11 did add brace initialization syntax to offer a way around the ve... (by keskiverto)
Cycle for (1,2)
There is a code. It counts the time of function foo() with the help of measureTime(). It works but s...
[37 replies] Last: Sum is 1 It took 0.0005066 seconds Sum is 3 Sum is 9 It took 0.003... (by alexandr2222)
by Setat
Shift Rotate a binary number.
Hi, I need to XOR two binary numbers bitwisely. (ex: 0010 xor 0111) The second number should be ri...
[8 replies] Last: I came back to this one late to look at it from a less general side...... (by jonnin)
Dynamic allocation copy constructor
Hi, I am learning Class and I want to write a code that insert value into an array that have been al...
[5 replies] Last: Consider: #include <iostream> #include <algorithm> class Data { pr... (by seeplus)
Any Help?
Another edit and run poster. @seeplus, if you delete your post, I can delete this and then the whole...
[1 reply] : First design the program, then code the program from the design. First... (by seeplus)
by Ticbow
Text adventure rooms - Voids or Classes?
Hi, I'm working on a little text adventure project in C++ and I'm not quite sure how I'll do the roo...
[6 replies] Last: Wow! I didn't expect this many responses! This was all really helpful,... (by Ticbow)
This program will analyze a text file given by the user and report the frequency of letters within t...
[7 replies] Last: Ok, crashing isn't the right word, but I think (hope) he got my meanin... (by agent max)
Looping Error
Hey there, I'm having some trouble with a function that is supposed to prompt a user to enter the na...
[4 replies] Last: Ahhhhhh, the noobery. Thanks a ton. (by coff33Cup)
Pages: 1... 678910
  Archived months: [feb2021]

Cannot post in this page. To post a new message, go to the first page.