General C++ Programming - April 2018 (Page 2)

Understanding arrays with equations
 
I am trying to complete a homework assignment for my engineering programming applications course but I have been struggling to get understand and properly utili...
[7 replies] Last: Awesome, I'm getting the correct value now! Thanks for the insight! An... (by tempusrevolutio)
copy and swap idiom
 
Hi guys I am trying to get to grips with move semantics I must say c++11 is much more complex then previous versions well it is in my opinion I know the use of ...
[no replies]
Teronary operator
 
here is the snippet of code I am referring to which is in the copy constructor,I don't understand what the terenry operator is doing hereit is saying if mSize i...
[4 replies] Last: thanks guys that makes sense! :) (by adam2016)
inheritance C++ Preson Class
 
I have a problem. this code is not compilling. I have to make person class, then with name and surname, then make Abonememt class, connect to person class an...
[9 replies] Last: My teacher told me to use char massive, to learn working on massive in... (by andriasss)
macro directive: how test if the function is defined?
 
if the function isn't defined, the compiler give me an error. so what is the directive for i control it? i'm trying: #if !defined(clsPointer->MouseClick) ...
[11 replies] Last: Virtually select a different function for each derived class. #includ... (by mbozzi)
by Thesar
Reading doubles from file, using exceptions to write to file
 
Hi everybody. I am writing a program that will take in values through inFile, all these values will be read as strings and converted to doubles. The range is 0....
[no replies]
Please tell me a project to be master in C/C++
 
Hi Everyone, I am new person of your forum. I am interested in C programming, but i am not master about it. I want to be master about C/C++ programming. ...
[2 replies] Last: I can not draw route map. I should follow an sequence, but i don't kno... (by unknownperson)
how get a function, from a pointer, to a lambda?
 
how can i get a function, from a pointer, to a lambda? test(ClassDerived *clsPointer) { std::function<void(void)> func =clsPointer->MouseClick; ...
[2 replies] Last: thank you so much for all i did the test, but don't work for what i ne... (by Cambalinho)
by Mk87
bug
 
hh
[7 replies] Last: Not sure I understand, but if you use i for other things where you n... (by Peter87)
Max vector size
 
Do vectors with type <struct> have a smaller max size than vectors of other types (int, double, etc). If so, would a class be larger, or are there any ways to i...
[1 reply] : Are you talking about std::vector<T>::max_size() ? http://www.cpluspl... (by Peter87)
by ahaana
c++ timetable coding using structure
 
hello Can anybody help me with the c++ coding for timetable in structure. in this there are 4 functions: 1. Clear data 2. insert data 3. show data: to sho...
[no replies]
Is this all there is to C++ programming?
 
https://imgur.com/a/wIApx6r So I still consider myself a beginner, but I've done nearly all of these topics. Is this really all there is to C++? Where s...
[7 replies] Last: That's why I'm thinking of getting into java @sciman777, maybe try ... (by Thomas1965)
by stav
cpp file for templated class?
 
Hi! if i have a class that is templated is it then possible to have a .cpp file for its functions? something like this? test.h template <typename...
[1 reply] : http://www.cplusplus.com/forum/general/113904/#msg622073 http://www.cp... (by ne555)
Trouble putting together the menu
 
I'm having trouble making the switch menu; I want to assign each case to do an specific thing; I labeled everything so you know what I'm talking about. #in...
[no replies]
Expression Must Have Class Type Error
 
Hi, I'm doing an assignment that calculates the future value using the compound interest formula. This is a OOP code. I've set up the class but I'm having a p...
[2 replies] Last: Thanks for the link. The error i get comes from lines 74 and 75. The e... (by edsalazar524)
by stav
Assigning pointer a reference
 
Hi guys I have the following code: class myClass { private: std::ifstream* istream; public: void setStream(std::ifstream& stream) { this->istr...
[2 replies] Last: The confusion probably arises because someone told you references are ... (by mbozzi)
Blixt Wipes out screen
 
I use C++ CodeBlocks. I made a program which accesses an A/D collects data and plots it. I used the render function to create my screen and graph axes. I can p...
[no replies]
by miamia
Shortest path problem
 
Hello, I need help with the following function: Write function with prototype map<char,string> paths(map<char,set<char> > g, char s) which does the followi...
[no replies]
Most frequent element help
 
Hello all! Beginner programmer here. I'm trying to write a program to output the most frequent character in the string but the output isn't working properly... ...
[1 reply] : try to also output the frequency of the character, perhaps you'll noti... (by ne555)
How to save classes into a vector
 
I am having troubles with my DVD collection assignment. I can get it to do most everything, but when I add any more than two DVDs, it wont save the extras. For ...
[no replies]
April 2018 Pages: 1234... 17
  Archived months: [mar2018] [may2018]

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