General C++ Programming - May 2020 (Page 3)

File I/O (HELP)!!
 
I have a inpu.dat binary file. I have to read this and assign the elements in it to a matrix. How ca...
[4 replies] Last: A C-style array type contains its dimensional information which sizeof... (by dutch)
student report program
 
I will be very a happy if anyone can assist me Suppose we want to compile a student academic re...
[3 replies] Last: I great technique for doing assignments like this is to copy the list ... (by dhayden)
How to program games like Project QT
 
Hello friends. I am new to game programming. So many things are still unclear. Can someone show me t...
[2 replies] Last: Some simple text games might be instructive and fun: High-low: The co... (by dhayden)
[SOLVED]Spinlock mutex not working with std::scoped_lock or std::lock_guard
 
I can call lock and unlock manually around the critical region and it works fine, but when I wrap it...
[no replies]
by kohit
how to use a different type to find value in std::set
 
I have a struct like: struct point{ int f; int b; point(){} point(int u, int v)...
[4 replies] Last: I was confused, if I have a key_type value with the key I need(such a... (by keskiverto)
How to use Boost in Visual Studio/Qt
 
To make a long story short, I need to use boost for various reasons. Anyways, I've searched and s...
[6 replies] Last: @malibor thank I really appreciate it and benefit of it.. (by marhuum)
functions help
 
i wanted to make a function and then checks if the user reboot or not. and in the int main function ...
[1 reply] : support's return type is void. That means it doesn't return any value.... (by Ganado)
by eladb
TCL shell fron CPP
 
hello gents, I would like to open TCL shell from CPP progrem. I have no idea how can it be done,...
[11 replies] Last: I am not sure why you have been getting the answers you are getting...... (by Duthomhas)
List with multiple template (1,2)
 
Good evening to everyone, I'm opening this topic because i need to solve a problem with templates i...
[29 replies] Last: To clear exactly what i'm doing with template_variable i should post h... (by AlessandroTZ)
different types to ?: operator
 
namespace { struct Base {}; struct Derived: Base {}; } int main() { Base a; Derived b;...
[4 replies] Last: Are you saying const Derived can not be directly converted to Base ... (by dhayden)
Understanding std::memory_order_release and std::memory_order_acquire
 
Please consider the following example code: #include <atomic> #include <thread> #include <cassert>...
[3 replies] Last: My previous post was exclusively in response to this question: can th... (by helios)
request for member '', which is of non-class type
 
I am trying to build a struct array and input the different attributes to that struct array with a l...
[1 reply] : s is an array of water_bottle objects, not an individual water_bottl... (by Ganado)
by thmm
dlib::timer crashes
 
I am playing around with the dlib library. The following code crashes in DEBUG build, but works fin...
[2 replies] Last: I added t.stop() at the end of main, but still the same behavior. (by thmm)
by Odglog
How to remove spaces between lines?
 
Hi, I hope you have a good day :) I was wondering if removing spaces between lines is possible, let...
[10 replies] Last: Odglog, you also don't necessarily need to use OpenGL for text renderi... (by Ganado)
C++ memory orderings
 
I just learned about memory orderings today, and I'm not sure I fully understand it. Basically the s...
[3 replies] Last: It looks like it deals with details of parallel processing and optim... (by TheToaster)
Using Generic Lambdas for SFINAE
 
In C++ Templates, The Complete Guide (2e), the author gives the following example trait definition ...
[4 replies] Last: Ahh that makes sense. Thank you. (by TheToaster)
comparing two substrings
 
Hi guys below is my code...so am trying to read for the input file then compare a specific part of a...
[6 replies] Last: Inside the while loop you check if num1 == 0 (by Thomas1965)
Does Liskov Substitution Principle (LSP) conflict with public inheritance's IS-A semantics?
 
Hi, LSP states that if a function's parameter type is pointer or reference to Superclass, then pr...
[3 replies] Last: So, it appears that Square IS-NOT-A rectangle... No, class square I... (by Repeater)
What's the best way to create a n array of classes?
 
So I have two classes, A and B. And I want to create an array of A in B. What's the best way to do t...
[1 reply] : Who cares? Yes indeed, who needs to know about A? If the answer is " ... (by keskiverto)
fold expression does not work when using std::unique_ptr<>
 
Hi, The following code will not compile - in particular the traverse() function. I get this error...
[2 replies] Last: great solution!! Thanks! Juan (by JUANDENT)
May 2020 Pages: 12345... 9
  Archived months: [apr2020] [jun2020]

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