General C++ Programming - November 2020 (Page 4)

Class Initializer list vs memset(ZeroMemory)
 
Class Initializer list vs memset(ZeroMemory) Hi. When I use class constructor and I need to initialize every member variables as NULL or nullptr. Usually I u...
[4 replies] Last: seeplus // I remember that. thank you! (by woohyeon)
Tic Tac Toe Game Using Without Arrays Please Help
 
It's working fine but the Win and Loss Result Is not Correct Please help #include<iostream> #include <string> using namespace std; int main() { int j...
[9 replies] Last: I suppose you could use a bitmapped board to avoid an array. You would... (by dutch)
interactions statements
 
write a program that reads a positive least 2 digit and at most 6 digit integer and then checks if whether the last digit is a correct checksum which is the rem...
[4 replies] Last: The description of the problem as a whole might sound formidable, but ... (by Ganado)
Please Help....This program only calculate bill for one burger ...how do i do this for multiple burgers?
 
QUESTION:Write a C++ code to develop a software for your burger shop that takes orders for a tasty burger from the user, in just 5 steps. Attached below is the...
[3 replies] Last: Ok ThankYou <3 (by volodstaimi)
restaurant bill control structures
 
. i edited it since i figured it out thanks
[1 reply] : Help with what? There's no code posted to have a look at. What have yo... (by seeplus)
Pop function returning stack elments in reverse order
 
Hi ya'll, I'm creating a story using three stacks which will hold strings for nouns, verbs, and adjectives. I created a pop method which returns the string popp...
[5 replies] Last: I re-implemented your code, removed the comments and extraneous letter... (by Ganado)
how do i find chord's length?
 
So i need to do a project where i have following information in coordinate plane: 1. circle's center coordinates(which program's user declares) 2. circle's ra...
[7 replies] Last: (Based on @againtry's link) #include <iostream> #include <cmath> usi... (by lastchance)
Prototype error
 
Everytime I think I have these prototypes figured out I realize I don't. I am getting a c2082 redifnition error on line 67 #include<iostream> #include <c...
[15 replies] Last: I did read thanks for all you help (by briancb2004)
Preferential include path in CMake
 
Dear all, I use CMake for build system, and define include path of libraries via link_directories. Here, is there a way to switch the include path prefere...
[3 replies] Last: If you use quotes instead of angle brackets the compiler will first lo... (by helios)
Stack not displaying first letter of elements
 
Hey ya'll I'm trying to print out the elements in my stack and for some reaon the first letter of each stack element won't print. void StackStory::displaySta...
[4 replies] Last: void StackStory::displayStacks() { if (isEmpty()) cout <... (by seeplus)
Restart Loops in C++
 
I have a simple question in "theory" I have the following code, that is running for few thousands iterations, I am trying to add some restart loop or condition....
[4 replies] Last: if file exists: ?? you read the values in and kick off from where you... (by jonnin)
Sorry not truly C++, how set PIC flag in build by Cmake command line
 
How to set PIC flag in build by use of cmake command line? as in gcc is the option -fPIC e.g. cmake -G "Unix Makefiles" .....
[1 reply] : From a simple Google search for "cmake fPIC": https://stackoverflow.c... (by MikeyBoy)
Thread safety of accessing elements in TBB's containers
 
Dear C++ experts This is a fundamental question. I often use tbb's containers (tbb::concurrent_vector, tbb::concurrent_unorderd_map etc). Here, I know their ...
[5 replies] Last: Dear coder777 Thank you for your advice. When you put line 5/6 in t... (by Mitsuru)
Valgrind: Conditional jump or move depends on uninitialised value(s) (1,2)
 
Hello, I am running into an issue with Valgrind with c++ It is yelling when initializing multidimensional arrays in my code and I don't know why. I have a long...
[27 replies] Last: @TheIdeasMan Thank you for the great advice! The code is working now, ... (by JamieAl)
Help with baseball project
 
**In this project I had to write a program which calculates and displays a baseball player's batting average and proficiency. There are an unknown number of pla...
[2 replies] Last: thank you for your help! I've been stuck on this for a while and it wa... (by fonzeyy)
How to acces unity libraries
 
How can i acces unity c# libraries and see what function they have ? i know this isn't a c++ questions but i dont know where to ask..
[2 replies] Last: thanks (by grooviqw)
Criteria enforcing programm
 
The file format the program will read from First Name : john Last Name : peter Gender : M Student ID : 7483289 Course Code : 20174893 ...
[2 replies] Last: http://www.cplusplus.com/forum/beginner/270970/ (by againtry)
how to define string_cast<std::string>( std::wstring)?
 
Hi, I need to define a template function that can be specialize for changing strings to wstrings and viceversa, like so: wstring x; string b = string_...
[1 reply] : How about this: template<typename T, typename U> T string_cast(cons... (by JUANDENT)
by mnm71
How to delete first line of text file?
 
I have a thread that write some float in text file every 1 second,I want to control size of file and if line over 60 delete first line for add new data, but aft...
[4 replies] Last: In this case it would be most sensible to just keep the last 60 values... (by dutch)
write a console little game (1,2)
 
help me write please I need to hand over the work in 2 days, and I work every day. The task itself: tic tac toe Console output graphically (CLI). The cells are ...
[25 replies] Last: order actually (by svininka)
November 2020 Pages: 1234567
  Archived months: [oct2020] [dec2020]

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