General C++ Programming - June 2017

by zesan
How to manage bool function in abstract class ?
 
In my code below if true not returning 1 or 0 for false, please help....... #include <iostream> #include <string> #include <bits/stdc++.h> #include <ti...
[4 replies] Last: Thanks for the nice explanation :) (by zesan)
Declaring Functions that Take Lambdas
 
Hi, I have a linked list of Nodes that each contain a Human, looking something like this: struct Node { Human* human; Node* next; }; I want t...
[7 replies] Last: @Thomas1965 Sorry, that wasn't very clear. I was thinking about st... (by mbozzi)
Sorting problem
 
I am new to c++ programming and i need some help. I was able to read the text file and sort the list stated below using bubblesort but i don't know how to a...
[3 replies] Last: Hints: // I was able to read the text file and sort the list stated ... (by Enoizat)
Issue assigning characters into character array
 
Hi all, I'm trying to sort out how I can get user-entered data into a character array without. Would using getline be a better approach? I understand making ...
[no replies]
by zesan
How to call base constructor where virtual functions are problem ?
 
I want to call the base constructor using arguments in derived class but I must have the virtual functions inside the base. #include <iostream> #include ...
[1 reply] : Iboard b(1); Iboard is an abstract class (though can't see a reason ... (by gunnerfunner)
Hidden input (Clarify an answer on another question)
 
Can somebody please explain Guestgulkan's answer further in this question? http://www.cplusplus.com/forum/beginner/43683/ I'm not understanding what each ...
[5 replies] Last: the preprocessor is aside. The preprocessor will let you have 2 vers... (by jonnin)
by zesan
How to deal with several pure virtual functions ?
 
When I was implementing single pure virtual function it was working but now I have two which are not working, can anybody please help me out ? #include <ios...
[2 replies] Last: Couple of useful specifiers vis-a-vis virtual functions: http://en.cp... (by gunnerfunner)
by hav206
Inheritance problem---How do I access to members of child class in c++{myRoot in this case}
 
//bst.h file using namespace std; template <typename T> class BST { public: BST(); //T getleaf(const BSTNode *temp) const; bool empt...
[2 replies] Last: BSTNode is a subtype of a dependent base class. myRoot is further... (by mbozzi)
Plotting higher-order polynomials
 
Hi fellows. I'm just getting in touch with you to get your advice in finding the best methods for plotting higher-order polynomials. I've actually seen the Bair...
[5 replies] Last: As I said before, I just want to develop my own source code without us... (by artful1st)
How to find characters in a string of numbers
 
I need to find characters in a string of numbers. Okay, the code looks slightly malicious (and poorly executed), but I made it as a joke for me and a friend (an...
[5 replies] Last: That helps a ton! Thanks Thomas. (by BRGBLAKE)
by hav206
how would I find the level of the item in a search binary tree. Any idea. Thanks
 
template <typename T> int BST<T>::recursive_level(BSTNode *curr, const T& item) const { int level = 0; if (curr == NULL) { ...
[5 replies] Last: You could use bfs to traverse the tree while keeping an array with eve... (by Kalcor)
by Kalcor
What happens in this loop ?
 
Ignore this thread ////
[1 reply] : . (by Kalcor)
hide password input for both Windows and *Nix
 
I have written a program that just asks for a username and password to log in, and then executes a particular function depending on who logged in. It works but ...
[2 replies] Last: O.K this compiled on linux. Linux is still not compiling the windows h... (by KiritoVsHalt)
code isnt working properly?
 
the code runs but the input isnt doing what it is supposed to do, ive used flags to see if it is getting the input, which it is, but it still doesnt work, nad a...
[5 replies] Last: In the closing tag, the / goes before the word "code", not after it. (by MikeyBoy)
Object leaving scope causes program crash
 
I am working on a proprietary iOS app written mainly in c++. There is an object Foo that causes the program to crash whenever it leaves scope. I have an older v...
[16 replies] Last: No problem, if I had a penny for every time I misread some code... I w... (by MikeyBoy)
unordered_map
 
using namespace std; class test; class test { public: test(); test(const string &x); test(const test& t); ~test()...
[2 replies] Last: Before you can use unordered_map you need to include the <unordered_ma... (by Peter87)
by vgdd
Need to do essay don't know anything just need ideas
 
Write a research paper on the core principals of C++ and object oriented programming. 3 pages without code samples ( font 12, single spaced) The paper shoul...
[1 reply] : It's not clear what you want help with. (by kbw)
How to pass function pointer of a class method as C pointer?
 
Post Edited: Apologies for the badly formulated question. Here is a use example. In my class am drawing UI using ImGui::https://github.com/ocornut/imgui Th...
[4 replies] Last: A lambda can only be converted to the corresponding function-pointer ... (by gunnerfunner)
Ray mapping inn C++
 
Hello guys, Please I can anyone give me suggestion on good e-books or video tutorials, etc where I can learn Ray mapping in C++? I need to learn it for my acad...
[2 replies] Last: @kbw Thanks a million. Sorry I didn't acknowledge this on time. I just... (by ayoesquire)
by zesan
Is it possible to present class as abstract class ?
 
The code below for 15 puzzle, my task is to present it as the following syntax, but I am confused that is it possible to represent the code in this way below : ...
[3 replies] Last: Thanks guys, feeling so depressed because the given syntax for the pro... (by zesan)
June 2017 Pages: 123... 11
  Archived months: [may2017] [jul2017]

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