General C++ Programming - November 2016 (Page 9)

Getters and Setters with std::vector private members
 
Hi People, Please correct me if i am wrong. From this code, and for my surprise, I realized that...
[7 replies] Last: Finally I could see my mistake: I have to declare v2 as reference. ... (by dariodem)
c++ two dimensional array into one
 
hay guys i need to make a two dimensional array into a one. i think i have to use recursion? than...
[1 reply] : Is this what you meant - the make1d( ) function below? You can play ar... (by lastchance)
How to set value position in vector?
 
How can I set value position in vector without overwriting an value? for example, I have a vector...
[1 reply] : Is this insert() what you're looking for? http://www.cplusplus.com/r... (by wildblue)
Weird output of ""+'b'
 
Hello, I wrote the following line in c++: cout << ""+'b' << endl; The output is '[', which i...
[3 replies] Last: A string literal is actually const character array with a null termina... (by boost lexical cast)
Overloading Operator
 
I need to compare objects in a program. I need to provide the operator overloading for the operator...
[3 replies] Last: Another similar way: .h bool operator>(const Pokemon &) const; .cp... (by boost lexical cast)
Urgent help needed
 
An investor is facing the task of choosing the most economically viable project between 4 different ...
[4 replies] Last: "A mechanical student". Is that an electric, nuclear or steam powered ... (by closed account 48T7M4Gy)
by zandy
Vectors
 
Can somebody please help me with my vector and sorting functions. the trim and program are working b...
[1 reply] : http://www.cplusplus.com/reference/algorithm/sort/?kw=sort (by closed account 48T7M4Gy)
Overloading Operator
 
I need to compare objects in a program. I need to provide the operator overloading for the operator ...
[1 reply] : http://www.cplusplus.com/forum/general/202818/ (by closed account 48T7M4Gy)
by RovelC
Outputting Values in Selective Array Indexes
 
Hi All, I need your help in working out this problem. I want to print that desired output but i'm st...
[2 replies] Last: #include <iostream> int main() { constexpr std::size_t NROWS = 6... (by JLBorges)
by ubaidm
The sstream wouldn't read twice..!!!
 
#include <iostream> #include <string> #include <sstream> using namespace std; int main () { int ...
[4 replies] Last: Thank you..!! (by ubaidm)
How to not print the positive sign in a non-US locale
 
Hi, I am using a non-US locale that defines the positive sign as "+" but I don't want it displaye...
[no replies]
Find an element in sorted rotated array
 
I got this problem in an interview. I thought my solution was right but the interviewer said I was n...
[2 replies] Last: oh, got it now, thanks! (by funprogrammer)
More support in C++, is it comming?
 
I'd like to see more support functions in C++, like: * XML support * Objectify all similar funct...
[4 replies] Last: More information: How Non-Member Functions Improve Encapsulation ... (by JLBorges)
by cppppc
Complexity analysis (recursion)?
 
Hi!! How you'd analyse functions like this one below?(details please) //***please ignore the decla...
[2 replies] Last: Thanks a lot for your time and for replying! (by cppppc)
Setting std::vector elements according to a std::vector of indexes
 
Hi People, I want to do -in the best possible way- something like this python line, in c++ by mea...
[4 replies] Last: Thanks JLBorges! I thought there was a prefabricated way to do the co... (by dariodem)
by bozmin
List and file
 
I have a store (txt) file that contains element . ex: V 4 Potato 2 Tomato 1 carrot 3 onion...
[1 reply] : just take each of those in a char array if the second element is '\0'... (by leryss22)
by qq387
Finding a tree successor with a given key
 
I am trying to write a function that will return the next smallest element key greater than the para...
[1 reply] : This implementation doesnt look really efficient here I have made you ... (by leryss22)
BST Insert
 
Been working on a program, that is supposed to read in data from a text file; first/last name, ssn, ...
[2 replies] Last: What you suggested in the same errors of not being able to convert Per... (by CubiksRube)
by DaviFN
How to (fastly) scan memory?
 
Hello everyone! I need to write a function that searches the memory of a process (I'm injected to...
[6 replies] Last: Yes, typo (corrected now). Should have been (mbi.Protect&pmask) Tha... (by JLBorges)
November 2016 Pages: 1... 7891011... 23
  Archived months: [oct2016] [dec2016]

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