General C++ Programming - July 2017 (Page 4)

ShiftOut issue.
 
Hi everyone. I am working currently with two 8-Bit 74HC164D Shift Registers that are driving 2x4 7segment displays connected together. However, i have an issue,...
[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. Assign the dereferenced values work but not assigning pointer to...
[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 specific point in a vector of points. I am getting different ...
[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:231:54: warning: narrowing conversion of ‘(((int)mv->AVMotio...
[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 communicating via mmap memory. One process, the capture daemon saves a...
[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 <iostream> struct myint{ int x; myint(int ix):x(ix){}...
[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 not so. Trying to dereference the element, but get unwanted ...
[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 directoryes and run files, nothing else for now, but i managed to do i...
[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 { }; This code is taken from Bjarne Stroustrup...
[7 replies] Last: I don't have those examples in my book, check my screenshot of page 72... (by gedamial)
#define GLEW_STATIC
 
I successfully deployed this preprocessor directive in Eclipse compiler options (-D) as I was looking for a solution to a problem that the -D has fortunately fi...
[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 backtracking algorithm and I know that it does work, but I'm trying ...
[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.com/w/cpp/types/conditional I ended up making my own ver...
[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 there is a way to run by writing c++ program.cpp -o progra...
[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 point like 1.00, 0.50, 0.33, 0.25, 0.20 0.17 when dividing 1 ...
[6 replies] Last: JLBorges thanks! I figured the rest out! (by aurimas13)
problems with sudoku solver function
 
Can someone please help me to know how I can fix my code to be able to solve a sudoku board. I know it's long but I really need the help. I suspect the problem ...
[1 reply] : 1) Please use code tags when posting code, to make it readable: http... (by MikeyBoy)
Graphics interface question
 
Hi, I want to run graphics interface on C++ compiler run by Xcode on my mac, but get the error message: 'graphics.h' file not found. Same for 'conio.h'. Where's...
[3 replies] Last: I might have been wrong about graphics.h. I don't even know if the mac... (by Peter87)
Please recommend me an advanced level C++ book
 
I am currently reading "C++ for concurrency". Now I am looking for next one. I want a book can focus on updates on C++11, C++14 and some advanced topic like da...
[5 replies] Last: OP: as you delve deeper into CPP, as the nature of your query suggests... (by gunnerfunner)
Drawing a line with ncurses
 
Hello, I would like to know how to draw a line or lines in my multiplication table with ncurses? The code is below. #include <iostream> #include <curses.h>...
[no replies]
Crash when assigning value to LinkedList node
 
I'm trying to make my own LinkedList class, but when I try to make a node in my main function and assign it a value, my program crashes. //LinkedList.h #if...
[2 replies] Last: Thanks Peter87 for the fast reply on why my program crashes! Now I und... (by goldenchicken)
July 2017 Pages: 123456
  Archived months: [jun2017] [aug2017]

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