General C++ Programming - April 2021 (Page 8)

I want it to print if "LINDO" is said or print that way if "lpsolve" is said need help
 
//March 2021 // Collin Brown, Jada Satchell, Deric N //Compiler: C++ Shell #include <iostream> #include <string> using namespace std; const int LIMIT=...
[2 replies] Last: You can't define a function within a function eg you can't define anot... (by seeplus)
by cernet
C++ design pattern: Observer
 
Are there any resources that teach (with examples) the observer pattern and other design patterns?There's this book called Game Programming Patterns, it teaches...
[2 replies] Last: Have a look at Design Patterns in Modern C++: Reusable Approaches for ... (by seeplus)
Use std::list to remove element from user entered string
 
If this function uses a user-entered string ISBN, how can I find the element in the linked list and delete the book? I am required to only use public member fun...
[1 reply] : > how can I find the element in the linked list go through each elemen... (by ne555)
Time limit exceeded
 
I've been stuck on this problem (https://codeforces.com/contest/1492/problem/B) for a pretty Long while. I always get "Time limit exceeded" when I submit the co...
[4 replies] Last: @lastchance: I don't understand you, you complain about an unnecessary... (by ne555)
program to add 3 values and add 16% value added tax
 
im supposed to create a c++ program that adds three values together and adds 16% value added tax and it displays the heading "The total price is" #include <i...
[1 reply] : There's a tutorial here at cplusplus: http://www.cplusplus.com/doc/tut... (by George P)
by helios
!std::is_enum<SomeEnum>::value?
 
Given: class PlayState{ public: enum Value{ STOPPED = 0, PLAYING, ENDING, PAUSED, }; //... }; templa...
[8 replies] Last: @helios - I'd suggest reporting this to MS as a bug. (by seeplus)
Deadlocked Multi-Threads
 
I'm trying to optimize my program. So I decided to run 4 multi-threads to increase performance. However, the program runs barely any faster. I even tried to run...
[6 replies] Last: > EDIT: I think it's to do with this line I think you need to post th... (by salem c)
by VoB
Premature deletion: CPL book example
 
I'm trying to understand more in details the concept of premature deletion The following is taken from "The C++ Programming Language" book, 11.2.1 #inclu...
[2 replies] Last: Thanks @seeplus for your check. I know it's better to use manager obje... (by VoB)
this code work some time some time no
 
some time the cursor lead the circle so the circle stop draging iam using glfw c++ no ortho setting void Circle::update() { int state = glfwGetMouseButton(wind...
[5 replies] Last: yes salem thanks alot it was the error now it work perfectly Ganado... (by aymanawa)
What does Profiler's readings mean when a runnning a multithreaded program
 
Profiler: CallGrind CPU: 2-Core SMT I am profiling a program, which contains some logic that I have written and calls to the Neural Network Library Libtorch (C...
[1 reply] : i believe it is pure %. So 1/2 your *processing effort* was spent on... (by jonnin)
replace function with c++
 
So, in python, you can easily replace a phrase in a text using s.replace(,). I wanted to know how to do the exact same thing on c++. the normal replace functio...
[3 replies] Last: Or to replace all occurrences rather than just the first: #include ... (by seeplus)
by Ticbow
Text editor c++ gui
 
I'm trying to practice my c++ by making a mock text editor for console applications like that of the MS-DOS editor, but I don't know how to make a toolbar that ...
[2 replies] Last: Thank you, I'll try that out! (by Ticbow)
April 2021 Pages: 1... 678
  Archived months: [mar2021] [may2021]

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