General C++ Programming (Page 3)

Compile time decision whether a pointer type is NULL or no
 
How do we check at compile time whether or not a pointer type argument is nullptr in C++?
[2 replies] Last: You can use the standard type trait std::is_null_pointer: https://en.c... (by TheToaster)
Increment and Decrement Operator Overloding
 
Hi, i have my submission in 8 hours and the code is almost complete. I asked one of my fellow frien...
[1 reply] : Your increment and decrement ops are supposed to modify the 'this' obj... (by dutch)
Codelite Debugger Issue
 
Hi, I'm currently using Codelite on a mac. When I try to use the debugger, I get an error saying "F...
[2 replies] Last: there's Settings -> GDB setting -> Debugger Path in image: https://m... (by abdulbadii)
How can I configure CGAL with CMake?
 
Dear All, I hope you are all well and healthy. Currently I am working on the installation of...
[2 replies] Last: Sorry, your OS is Windows, some installation procedure differs from Li... (by Mitsuru)
C ++ homework help
 
Find the product of two matrices, a (3x3) and b (3x3), where the user enters the values, and find ...
[9 replies] Last: I don't know what you're apologizing for, we're just saying to be more... (by Ganado)
by Vycues
I haven't used C++ Templates and I am getting multiple syntax errors (1,2)
 
I am using C++ Visual Studio Community 2015. I am using the template with a class that has a std::ar...
[30 replies] Last: I see. I fixed the fill function as you suggested and it works. Thanks... (by Vycues)
by frek
Rule of Zero
 
Hi folks, I've read much about rules (zero, three and five) on the Web, and tried well enough, bu...
[7 replies] Last: IMHO, the 0/3/5/6/? is just one, unambiguous rule: Do what you have to... (by jonnin)
contructor vs inline initialization
 
what is the difference between template<class T> stuct S { T x = value; }; and template<cl...
[2 replies] Last: as Core Guidelines put it, C.48: Prefer in-class initializers to membe... (by Cubbi)
C++ coding quiz
 
There're 4 bytes in a row, each is to be its own value How do we find the byte of greatest value ou...
[1 reply] : https://www.cplusplus.com/reference/algorithm/max_element/ (by salem c)
Why do we need dynamic memory allocation in C++?
 
Hello, Greetings; hope you all are fine, safe and doing well. I am doing my BSSE through course mat...
[6 replies] Last: Another point to consider: data* return_data() { data d; ret... (by TheToaster)
cppdb link errors
 
I have been trying to use cppdb (http://cppcms.com/sql/cppdb/index.html), but I can't get past linki...
[4 replies] Last: Glad you got it working. In general, there's really no guarantee that ... (by Ganado)
Range based for loop
 
I am a bit stuck on this question #include <iostream> #include <vector> using namespace std; i...
[5 replies] Last: When using range based for loops, you are working with the actual valu... (by doug4)
&& not working as expected
 
For my assignment I have to take sets of 3 integers separated by spaces from the user input and de...
[1 reply] : However the loop is exiting if only one condition is met. Thats wh... (by TheToaster)
std::allocator implementation
 
does anyone know how the default STL allocator class works, I need help implementing this temp...
[3 replies] Last: forgot Microsoft's: https://github.com/microsoft/STL/blob/master/stl/i... (by Cubbi)
decltype
 
I have this question but I don't think I fully understood how to use decltype map<int, float> m = ...
[2 replies] Last: Maybe this? using type = decltype(std::pair<int, int>()); using ft... (by malibor)
std::experimental::future
 
Could someone explain to me the operation of std::experimental::future? I read about it in C++ Concu...
[7 replies] Last: Well, in the particular case of futures/promises, there's the implemen... (by helios)
How do I get my won/loss/tie counter to work?
 
#include <cstdlib> #include <ctime> #include <iostream> #include <string> using namespace std...
[2 replies] Last: Thank you (by Programmingaddict)
by RicoJ
Wrong std::reference_wrapper to reference assignment?
 
I was expecting to get -4, but I ended up getting -3. I thought ret in foo will keep a reference to ...
[11 replies] Last: That's what I get for not reading things properly. I would still not a... (by helios)
One more line of code I need to make it work
 
My program inputs two integers and determines if the first number is a multiple of the second number...
[3 replies] Last: I think your original code is preferable. 4 is not a multiple of 0, so... (by dhayden)
Structure with Pointers, Not getting any output with this code
 
Write your question here. Here I am trying to use MyTime struct for calculating time between two ti...
[7 replies] Last: Both are awful in modern C++. I thought I'd elaborate on Salem C's p... (by dhayden)
Pages: 12345... 18
  Archived months: [mar2020]

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