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

High Level Research Paper
 
I understand a good bit of C++. I am what you will call an Intermediate Learner. For my Internship I was given a Research Paper of the following topic: Cardinal...
[11 replies] Last: It looks like you're talking about the statement at the bottom of Fig ... (by dhayden)
by i773
.dll question about acquiring an object from managed code
 
I'm trying to call a .dll function from managed code but the application has it's own plugin entry point that takes in a structured object (message) that's pass...
[no replies]
How to implement logic of the set sorting ?
 
I want to implement the logic of std::set in c++, for example (example is different from the std::set) in the sort function you can pass additional parameter wh...
[1 reply] : http://www.cplusplus.com/reference/set/set/ Internally, the elements ... (by ne555)
Declaration of Templates
 
How are templates declared in the header file? E.g. I have the following function template in .cpp: template<typename T> bool Class::Check(const T &val...
[4 replies] Last: Note that this compares the argument value with itself. template<ty... (by JLBorges)
Understanding the creature created by static_cast<type&&>(x) (1,2)
 
From http://en.cppreference.com/w/cpp/language/static_cast If new_type is an rvalue reference type , static_cast converts the value of glvalue, class prval...
[25 replies] Last: telling the compiler to generate an xvalue is exactly what it has to d... (by Cubbi)
Add the digits in 2^1000
 
how do i add digits in 2^1000; i need idea on how to do it?
[16 replies] Last: See one algorithm here: http://www.eng.utah.edu/~nmcdonal/Tutorials/B... (by lastchance)
Good C/C++ projects
 
Hello, I'd like someone to recommend me a good C/C++ project. I googled online, but I could only find small miniprojects or beginner projects. Could I have a...
[12 replies] Last: First the STL has one already and second they should not be used at a... (by zepher)
Detect if a file exists?
 
Is there a way to simply do this? Edit: Also looking for a way to detect what the extension is. Edit 2: It turns out I don't need a way to detect what the ext...
[11 replies] Last: For now the best would be to use boost or Kahless_9. (by zepher)
Problems with basic SDL with C++: SDL_Rect
 
Hello, I get an error(EXC_BAD_ACCESS) on the first declaration in the for loop in my code. Everything to do with SDL is properly included and initialized. I ...
[1 reply] : You have an array of pointer. The pointer needs to point to something,... (by coder777)
Problems with a linked list where every node has a pointer to the left, right, above, and below.
 
Hello, I am trying to write a program to handle a linked list that is connected from all sides(i.e. each node has a pointer to the node above, below, and to ...
[4 replies] Last: As a global, it is zero-initialized. Ah, I'd forgotten that - thanks... (by MikeyBoy)
Why can std::move() force move semantics and I can't?
 
std::move() casts any given parameter into a rvalue reference Suppose I have a struct obj struct obj { obj() {} obj(obj&& rv) {} obj& operator=(o...
[13 replies] Last: Thank you all very much :) (by gedamial)
Returning by value [vs] returning by rvalue
 
Look at this code string&& join(string&& rv, const char* s) { return move(rv.append(s)); } string temp() { return "temp"; } const string& r = join(te...
[4 replies] Last: Thank you for the detailed explanation! Let's see if I understood tho... (by gedamial)
by Mite
Background image
 
How to add background image for c++ program...i read something about library Cimg.H..How to install it in TURBOC++? Thanx Alot.
[14 replies] Last: ok its done...i need to install imagmagick (by Mite)
by mogha
CSS File parser
 
I am looking for simple CSS file parser.This parser should parse file containing styles. Any simple library code reference will help. Thanks
[no replies]
Overloading operator<< to take wathever type
 
Hi everyone, this is the code I have so far: #include <Windows.h> #include <iostream> #include <string> #include <fstream> using namespace std; class MyCout ...
[2 replies] Last: Thanks for the reply JLBorges, though actually while waiting for a rep... (by Marcus Aseth)
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 will give them an error. This is wrong, so how would I do this ...
[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 while still calling from the class Record? (in main.cpp) Recor...
[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 to pass a reference of a base abstract class to a different ...
[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 divisible. Then print a single dimension array to evenly divisible...
[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. //what I need GenericFunction gf = std::function( ...
[no replies]
July 2017 Pages: 123456
  Archived months: [jun2017] [aug2017]

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