General C++ Programming (Page 4)

How do I refactor two classes with similar functionality?
 
I have classes with methods with the same names that do the same thing yet they are implemented diff...
[3 replies] Last: I believe you can use a template interface with pure virtual functions... (by primem0ver)
How to run through a two dimensional matrix by using pow(2,n)?
 
I am trying to run through an array and its dimensions are being created as the program runs. I want...
[3 replies] Last: Thanks! It was solved! (by Poetjockey)
by rpsalh
acos not working
 
i was making program calculate basic things about shapes but when i used acos() for calculating ang...
[8 replies] Last: Cheers, I'm glad you found it. :) (by kemort)
binary search tree insert complexity
 
Could somebody please help me do a complexity analysis(deduction) of the insert algorithm of a binar...
[5 replies] Last: Never mind. I think I know it now. It's like 1+2+2^2+...2^k = n. That ... (by closed account GTMi1hU5)
Templates - Help
 
Hi there, I have a question about templates and I have been banging my head against a wall with this...
[9 replies] Last: H i and thank you for all the replies, btw fcantoro I know my origina... (by newbie78)
specifying header filepaths for MANY different paths
 
Hi guys. I'm trying to get a library I've downloaded to work with a project in Dev-C++. The proble...
[6 replies] Last: > OpenCV has too many directories for me to drag and drop into a diff... (by ne555)
by noob96
C++ Error: call of overloaded function is ambiguous
 
I have defined a function in one file - void c2bc( std::string& filename, std::string& outname ) ...
[10 replies] Last: It turns out I actually wanted to call parse_cpp_file function and not... (by noob96)
Help for memory management
 
Hi In the code below ,my question is when i delete sss , what happens to allocated memory for "*x" i...
[3 replies] Last: Yes. A class is identical to a struct in every way, save one: the de... (by MikeyBoy)
string permutation lexicographic order problem
 
I am pretty much a beginner in c++ and wanted a little challenge so i decided to make a program to p...
[8 replies] Last: thanks for trying to help but it doesn't help me improve my code it re... (by globaltourist)
help about best way
 
is it only okay for setter function definition to be more than 1 line? void Class::setter(c obj) {...
[4 replies] Last: i was thinking about which one is the best way First what happens, i... (by jlb)
memory allocation for array
 
How do I make a million ints? I can't do it with subscripted arrays. I can with dynamic memory alloc...
[8 replies] Last: Hi, Note that the pass by reference should be used for any of the STL... (by TheIdeasMan)
Frequency counting in large arrays
 
Hi! Alright, so i'm just starting a data structures class, and we're studying arrays. We were asked ...
[13 replies] Last: http://www.cplusplus.com/reference/algorithm/set_intersection/ (by kemort)
How to initialize a vector of structs with user data
 
I would want to initialize the following struct with user data using a vector of strings as below, h...
[3 replies] Last: You'll have to iterate through the vector (use a for loop) and check... (by Duoas)
by yiddo
Unknown mistake from a Textbook example
 
Hello guys. I'm involved with C++ for about 3 weeks by now. So far i enjoy the learning process. Som...
[4 replies] Last: I thought that my compiler is set by default for C++ 11 version, appa... (by jlb)
long long integer is down casted to int
 
Hi, The below program is used to count the no of inversions in an array.The program works fine for ...
[2 replies] Last: Yeah,Thanks that was the problem. (by abhisheksinghbiet)
C++ VECTORS
 
Hello, how's everybody going?. I am trying to copy exactly as it is, a vector<std::string> to a v...
[2 replies] Last: using byte = unsigned char ; std::vector<byte> to_bytes( const std::... (by JLBorges)
ERROR OF CODING
 
Actually my lecturer gave me some exercise. She wanted me to find what's the error of this coding. C...
[11 replies] Last: [quote=najihanzd]What kind of code tags is? Sorry I'm just new with th... (by FurryGuy)
Boost object_pool array allocation
 
Lately I have been using the boost::object_pool class to create memory pools in a program I am creat...
[2 replies] Last: This seems to work, thank you for your help. (by Shadowwolf)
To read a string from text file (searching the string) and compare with user input
 
I want to search through a text file database and display if the word or string is within the text f...
[15 replies] Last: Excellent - good luck with it. Come back with your attempts if you nee... (by kemort)
by jtm013
Program for 5 salaries and averages
 
This program is for a class and I am having trouble even starting it the question is.... Create ...
[5 replies] Last: Just to give you an idea... #include <iostream> #include <iomanip> #... (by chicofeo)
Pages: 123456... 30
  Archived months: [apr2016]

Cannot post in this page. To post a new message, go to the first page.