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

Using POD instead of boost::value_initialized
Hi, Is the following a good idea to replace boost::value_initialized? I would like to avoid having to depend on boost but I also want to ensure that all my var...
Jun 4, 2016 at 9:29pm
[no replies]
by Pavle
Kernel Usb
How to force kernel to send voltage from battery to usb port: http://forum.xda-developers com/showthread.php?t=2691624 (Add . before com) for my android??? I ...
Jun 4, 2016 at 9:26pm
[no replies]
Add elements to std::list using iterator
As the title states, I am trying to add elements to a std::list using an iterator. I have std::list<Student> students; declared in a header file, and I am try...
Jun 4, 2016 at 9:19pm
[15 replies] Last: The linker could not find the definition for those functions. And ind... (by cire)
Using a python function in C++
My question concerns using a pre-defined python function in a C++ script. I have looked at the documentation for this, and yet it is not very understandable to ...
Jun 4, 2016 at 8:55pm
[3 replies] Last: What you are trying to do isn't particularly difficult, but it is a lo... (by Duthomhas)
help me :) to complete this program
hey guys this program dont do anything in function whats the problem !? and how i can fix a salary function cuz mybe it does not work successfully in men...
Jun 4, 2016 at 4:27pm
[no replies]
cin.fail
I am trying to get the input "index" to be analyzed for "integer" or "non-int". This does not seem to be working for me.It seems straightforward: what is(are) m...
Jun 4, 2016 at 2:48pm
[2 replies] Last: got it, thx was just using numbers (by technologist)
My code on virual inheritance
I am new to virtual inheritance and I beware of doing something wrong There are 3 important classes: - Object<Division, Bracket> - Bracket<Object> - Division<B...
Jun 4, 2016 at 1:57pm
[no replies]
Someone please help me fix this
I tried and tried but it doesn't work. I need this kind of code. but i don't know how to continue right now.... #include <iostream> #include <string> usin...
Jun 4, 2016 at 11:49am
[6 replies] Last: http://www.cplusplus.com/forum/beginner/192211/ http://www.cplusplus.c... (by closed account 48T7M4Gy)
some serious error
Hi guys, Please have a look at the code below. There should be some serious error in it which I can't find! What about you please? double* get_from_jack(int*...
Jun 4, 2016 at 7:30am
[10 replies] Last: The book I read and use, first edition, first printing, is of 2008! Th... (by closed account G1vDizwU)
Call Constructor from Copy Constructor -> Stack Overflow (1,2,3)
Look at this: GString::GString(const char* CstyleString) { cout << "CTOR (" << CstyleString << ")" << endl; if (CstyleString == nullptr) CstyleString = ...
Jun 4, 2016 at 3:21am
[41 replies] Last: Wasn't this discussed earlier? http://www.cplusplus.com/forum/general/... (by JLBorges)
Qmake on Windows
How do I generate a Visual Studio project with all the configurations I need. I can create one with release and debug configurations, but I need a testing conf...
Jun 4, 2016 at 12:41am
[5 replies] Last: That doesn't look too bad, but this is a cross-platform project, and, ... (by IWishIKnew)
by vilela
Insert element into a vector of Nodes
Hi, guys! I'm having a problem with something that shouldn't really be a secret since it seems simple to do it. I'm trying to implement the Huffman code and my...
Jun 3, 2016 at 11:22pm
[1 reply] : In what way is std::vector::insert() not working? Does it not compile?... (by helios)
Random vector index chosen from subset of indices
Hi, I'm new here and new to C++. My background is in math, not programming. I have a vector of ints. I'd like to choose a (pseudo) random index out of the in...
Jun 3, 2016 at 11:00pm
[1 reply] : Update: I solved my problem. I'll do exactly as I said above, but inst... (by kloud135)
Can someone explain me what this code does?
Hey everyone, I want to overload the operator new and delete and so far it all works. I found a C++ Game Engine that, however, uses an different technique than...
Jun 3, 2016 at 10:19pm
[1 reply] : It allocates requested_bytes + sizeof(size_t) and writes the value of ... (by helios)
nth element question
Hi, Is this a correct description of nth_element() algorithm: partially sorts [first,nth) so that for: every i in [first,nth) and j in [nth,last) ...
Jun 3, 2016 at 7:38pm
[2 replies] Last: http://www.cplusplus.com/reference/algorithm/nth_element/ I've never ... (by doug4)
by helios
Pointer values and inheritance
Could casting a pointer between two related classes change the value of the pointer? More specifically, if I have a breakpoint in A::A(), assuming that I'm i...
Jun 3, 2016 at 6:04pm
[2 replies] Last: Thanks, that's what I thought. (by helios)
GPS_Logging & Evaluation
Hello, I have the following Problem: I want to calculate the standard derivation between two GPS Modules, so I can get an estimate on how accurate the one mo...
Jun 3, 2016 at 4:44pm
[6 replies] Last: Where are you even reading anything from your file? Why did you open ... (by jlb)
initializer_list - Why is the move constructor called here? O.o
Hello. Look at this code: #include <iostream> using namespace std; struct Foo { string n; Foo(string str) : n{str} { cout << "ctor (" << n ...
Jun 3, 2016 at 2:57pm
[9 replies] Last: I need it for learning the most Standard C++ as possible. clang wit... (by Cubbi)
valarray performance?
Hi all. Am I doing something wrong that causes valarray implicit vector operations to take 4 times longer than an explicit loop doing the same thing? Than...
Jun 3, 2016 at 2:29am
[2 replies] Last: Huh! Looks like I'll have to learn to use Mingw64 :( Thanks for the c... (by BrowserUk)
Return Statement: does it have a PlaceHolder?
Hello. I am coming back from this question I posted on StackOverflow: http://stackoverflow.com/questions/37594496/is-move-constructor-called-twice-in-c/3759459...
Jun 2, 2016 at 11:00pm
[8 replies] Last: Very very clear man, thanks =) (by gedamial)
June 2016 Pages: 1... 1011121314
  Archived months: [may2016] [jul2016]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.