General C++ Programming (Page 3)

Exception Catching
I'm trying to do a try catch in line 21, so if the user types something other than 1, 2, or 3 it wil...
[3 replies] Last: This is not a good use-case for using exceptions. However, this is how... (by JLBorges)
array class
I'm trying to change my basic array so I will instead be using the array class. How can I do this wh...
[1 reply] : Line 10 needs to be: array<Record, 10> book; string doesn't make s... (by coder777)
Trying to pass an abstract class reference to shared_ptr?
Hi guys, So I'm trying to kinda do a Java thing with C++ which is apparently capable. I'm trying ...
[2 replies] Last: Note that make_shared is used to create new objects. In the AppStateMa... (by Peter87)
count and list a divisible number in array
Hi. I need to create an array 10 x 10 numbers from 1-1000. Then enter a number that is evenly divisi...
[2 replies] Last: I see the suggestion to make full use of the function parameters hasn'... (by Chervil)
Generic Function
I want to write a class(Generic Function) to store the function, its parameters and its reture type....
[no replies]
ShiftOut issue.
Hi everyone. I am working currently with two 8-Bit 74HC164D Shift Registers that are driving 2x4 7se...
[1 reply] : Anyone please? (by RytisBe)
by cmisip
Pointer assignment question
I am missing something here. Why can't I assign the address of a pointer to another pointer. Assi...
[11 replies] Last: Thanks for everyone's time and attention, Chris (by cmisip)
by cmisip
Trying to understand std::find and std::equal_range
I am trying to see which Points are close ( within 5 pixels in both the x and y dimensions) to a sp...
[4 replies] Last: I am still working on other parts of the code and have not gotten to i... (by cmisip)
by cmisip
Narrowing conversion of
What does this mean ? ^ /home/cmisip/NetBeansProjects/ZoneMinder/src/zm_ffmpeg_camera.cpp:23...
[10 replies] Last: I am doing a large number of copies in a loop but it was necessary to ... (by cmisip)
by cmisip
std::vector and mmapped memory with two processes
I am working on a project where (If I understand correctly ), two separate processes are communicati...
[5 replies] Last: I am marking this as solved. Solution to vector copy into another mem... (by cmisip)
by cmisip
const_cast question
In the following code, does the constness of myint a get preserved? #include <cstdlib> #include <...
[7 replies] Last: The const_cast solution does not seem to have any untoward side effect... (by cmisip)
count and list a divisible number in array
double post
[no replies]
character array printing junk
What am I doing wrong? I thought in both cases some elements of "Phrase" would be printed back, but ...
[6 replies] Last: some other memory location that has unknown bytes. You can grab a poi... (by jonnin)
C++ file explorer
Hello fellas, i wanna do something like an cmd file explorer in C++, the scope is to open directorye...
[7 replies] Last: @doug4 @dhayden Oops, i didnt know that shortening may cause such a pr... (by CosminPerRam)
'std::string': illegal type for non-type template parameter
The code I'm trying to compile is this template<typename T, T default_value = T{}> struct Vec...
[7 replies] Last: I don't have those examples in my book, check my screenshot of page 72... (by gedamial)
I successfully deployed this preprocessor directive in Eclipse compiler options (-D) as I was lookin...
[2 replies] Last: Thx!! (by technologist)
understanding recursion
Can someone give me a comprehensive line by line explanation of how this code works? It's a backtrac...
[12 replies] Last: Here's how recursion works: it adds stackframe over stackframe until i... (by Golden Lizard)
When to use "typename" in a using declaration?
Hello. I was looking at the implementation of the std::conditional here >> http://en.cppreference...
[7 replies] Last: > Am I correct? Yes. Without the disambiguators, T::MyType would ... (by JLBorges)
How to run a c++ program from a command prompt
Hello, I would like to know how to run a c++ program with .cpp extension from command prompt? I know...
[10 replies] Last: Thanks jonnin! (by aurimas13)
Question about floats
Hey, I am interested to know how I could get numbers to be equal to two significant digits after a p...
[6 replies] Last: JLBorges thanks! I figured the rest out! (by aurimas13)
Pages: 12345... 16
  Archived months: [may2017]

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