General C++ Programming - March 2018 (Page 13)

Moving Ahead
 
Hello C++ Programmers, I feel like I'm probably an intermediate sort of guy right now. Are there any suggestions that what should I do next. Like move o...
[2 replies] Last: Stroustrup in 'Programming: Principles and Practice Using C++' What ... (by JLBorges)
by DiaZie
Output problem
 
template<class T> class XVar { private: T m_X; public: XVar(T x) { m_X = x; } T GetXValue() { return m_X; } }; template<class T, class U, class V> cl...
[7 replies] Last: thanks you so much that helps me out. I fixed it (by DiaZie)
C++ template question
 
Hello, In my test.h file, template <class T> class B : public A<T> { public: // B( const T &x ) : A<T>(x) {} B<T> * my_method( const T &x ); } ...
[1 reply] : Place the definition in the header file. See: Why can’t I separate ... (by JLBorges)
Shortest path and double cost edge
 
The code I have successfully finds the shortest path when the distance both ways from one node to an adjacent is the same in both directions, but if say going f...
[6 replies] Last: Hmm I just thought that syntax highlighting of that thin made it easie... (by sonar87)
Rent-A-Car Program (Please Help)
 
I have been tasked to create a highly detailed Rent-A-Car program. I am struggling a far amount. If someone could help, that would be great! Here is the task; ...
[1 reply] : What do you need help with? Nobody here is going to do your homework ... (by doug4)
by ir8o8
For loop- Processing a line.
 
How do you process a line using a for loop?
[4 replies] Last: I have figured it out, Thank you for your help! (: (by ir8o8)
Text file does not create newline
 
Hello, I have this simple code. The resulting text file became output like this F16Perlis instead of this F 16 Perlis Anyone can help me figur...
[2 replies] Last: Can you post your whole program? And when you use code tags (thanks f... (by doug4)
How long it could take?
 
I would like to create on VPN server, login panel, what will be working on mobile app as a login by gmail, facebook, email or guest, with updating simple inform...
[5 replies] Last: 10 years. It COULD take 10 years. (it could also take 2 months, if y... (by jonnin)
adding sequence
 
#include <iostream> using namespace std; int main() { float i, n, sum = 0; cout << " Enter n "; cin >> n; for (i = 1; i <= n; i++) ...
[5 replies] Last: it was a practice problem with answers (by briankiprono)
C++ teacher, Need assignment source
 
Hello everyone, I am a C++ teacher and I need a website or source for class assignments. Right now I need some assignments for Copy and Move constructors. Than...
[1 reply] : > Right now I need some assignments for Copy and Move constructors. C... (by JLBorges)
cin.get(); being skipped in program
 
Hey guys so Im writting a text-based game and I wanted to split up the program and wait for some user responses so everything isn't spat out to the user at once...
[1 reply] : It is possible that other input leaves characters in the stream. You m... (by coder777)
by pandya
COINIT_MULTITHREADED
 
HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED); hRes=0x80010106 we cannot change the thread mode after it is set.
[2 replies] Last: That's correct. You cannot change the thread model after it is set. h... (by Repeater)
Casting
 
I have a question at this program: /*1*/ #include <iostream> /*2*/ using namespace std; /*3*/ class A{ /*4*/ public: /*5*/ virtual void print() {...
[3 replies] Last: Thank you, JLBorges. (by David1357)
UDK: How are the "Mappable keys" raised
 
Hi all So, would anyone know how the events of the keys pressed for UDK are lifted? We would like to be able to use a new device other than the mouse, the...
[no replies]
by bst
palindrome recursive
 
I need to write a program for a palindrome using recursive functions and this is what I got so far but the problem is that my code only works if its a word not ...
[4 replies] Last: I think something like this should work, if you really need to recurse... (by woldaker)
No Error returned using pointers
 
I've been trying to make a text-based game and I'm constantly getting no execution error and no compilation errors. Everything's returning 0. I have a player ...
[9 replies] Last: Awesome thanks man :) I like your c++11 "std::unique_ptr" much better ... (by bradltr95)
Help me
 
Winter Racing in Informatics Veliko Tarnovo, 27 February-1 March 2015 Group D, 6 – 7 Grade Task D1. Binary numbers Author: Velislava Damodaran Joanna fou...
[no replies]
Select certain number
 
Hello, Lets say A is equal to 12345678912345. How can I select the third and fourth number in the numbers as input in B. And the eighth and ninth number as ...
[3 replies] Last: Thanks @Thomas1965 and @lastchance for your help. It works well. :) (by uglybetty)
Dynamic Array and Operation Overload
 
I am having a hard time figuring out why my Overloaded operation does not return what I am looking for. If I display my matrix right after the calculations, it ...
[1 reply] : You don't provide a copy constructor or assignment operator. So when ... (by kbw)
A copy file Function
 
#include<iostream> #include<fstream> using namespace std; void copyRead(ifstream inFile, ofstream oFile) { string data; for (int i = 0; inFile.eof(...
[1 reply] : Streams can't be copied so you need to pass them by reference. http://... (by Thomas1965)
March 2018 Pages: 1... 1112131415
  Archived months: [feb2018] [apr2018]

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