General C++ Programming - July 2016 (Page 12)

Help with checking for a straight
 
I'm have a small issue with evaluating a straight in a seven card hand, where you want to get the hi...
[4 replies] Last: went with this instead for (int i = FACES; i >= 1; i--) { if ((_c... (by closed account SETp4iN6)
Dont know what type to use for this lambda parameter
 
I have a function max_palprime(n) that is supposed to find the highest palindromic prime less or equ...
[5 replies] Last: > Would you advice the use of std::size_t in the other functions Defi... (by JLBorges)
&&
 
#include <iostream> int main() { int x = 1; int&& x1 = static_cast<int&&>(x); int&& x2 ...
[3 replies] Last: @gedanial, Thanks! @cire, it is equal to: #include <utility> int ma... (by Wu zhen hai)
After searching and obtaining a record, how can one erase the found record from a file ?
 
I have written this method to search a row (line of comma separated strings) from a text file, once...
[11 replies] Last: Adopt the conventional dbf serialisation style. Incorporate an additio... (by closed account 48T7M4Gy)
glew linking problems
 
Hi all, I'm new here. So forgive me if this is obvious, but I've been struggling for hours on this t...
[5 replies] Last: @AcarX, Your example is a user-defined function, not a library functi... (by closed account E0p9LyTq)
my testing life
 
Reported for the following reason: "Spamming and inappropriate content"
[no replies]
Inheritance and array allocation issue
 
My current two projects has me delving into the finer points of C++. If you read any of my previous...
[3 replies] Last: I found the problem myself. Since I was accessing mItemCollection wit... (by primem0ver)
Olympiad Question
 
Hi, Recently I have tried to do few Olympiad problems to get my logic up to speed however whilst do...
[2 replies] Last: @Peter87 That drawing out was amazing thank you for helping me actual... (by closed account 13bSLyTq)
by elay
program crashes in emplace back
 
const std::vector<sf::Vector2f>& getSnakePosition(const std::vector<Tail>& snakePosition) { s...
[4 replies] Last: Also, I just realized you are returning a reference to a local var... (by elay)
by cotro
Weird reflection of image elements with a targa image
 
Hi, I am currently doing a program that reads an image in the targa format, does some processing on ...
[3 replies] Last: No, only one will work, because the data is laid out in memory by rows... (by Duthomhas)
Visual Studio
 
I downloaded Visual Studio 15 plus 3 updates, 1, 2, and 3, but I cannot find the icon. any suggestio...
[1 reply] : I have visual studio 12 and the executable is named "devenv.exe" her... (by leryss22)
Print c++ bool getting question mark
 
So i am trying to debug some code. But everytime I print a bool variable I kept getting a question m...
[4 replies] Last: A quick web search suggests that GLboolean is often defined as unsign... (by Peter87)
by aatwo
Corrupt pointer on function return
 
Hey guys. I just got told off by my boss for a snippet of code and in the interest of self improveme...
[9 replies] Last: Those two snippets are not like what OP posted. MyObject* GetMyObjec... (by helios)
return type deduction fails whyen moving to C++ 14
 
Hi, I downloaded the following code and it seemed to me that we could benefit from moving it to C++...
[5 replies] Last: > why the replacement of return types in the original code presented h... (by JLBorges)
No matching function for call to 'enterATab'
 
I keep getting an error message "No matching function for call to 'enterATab' " and I just can't see...
[8 replies] Last: The problem is in your enterATab function. Why do you enter the data i... (by Thomas1965)
Read all images from a folder
 
Hello , I have the next sequence of code, and i want to read all images from folder, but in this sta...
[5 replies] Last: I think the right way to do it is to store the image filenames as a fo... (by Thomas1965)
Template specialization in non-namespace scope
 
Hi. Look at this piece of code. (compiles on MSVC++, doesn't compile on gcc and clang) #include ...
[3 replies] Last: > Seems a pretty strange decision. Who knows... they must have their r... (by JLBorges)
c++ object creation error after constructor
 
Hi, i have a class called A with a constructor. In the main program I have the following code: ...
[1 reply] : The variable name shadows the type name. // Creates an object of typ... (by Peter87)
Can't access "using" directive from a template struct
 
Hi. I'm making my own std::conditional<> implementation. Look at this simple example: template<...
[3 replies] Last: Yes. The name of a nested type is in the scope of its enclosing class. (by JLBorges)
Books
 
Hello all! I plan on buying C++ Primer (5th Edition), and Programming: Principles and Practice Using...
[6 replies] Last: Thanks @Little Captin that's pretty much what I've been trying to get ... (by YvngSavage)
July 2016 Pages: 1... 10111213
  Archived months: [jun2016] [aug2016]

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