General C++ Programming - August 2015 (Page 12)

Got a problem with the exclamation point not moving to the end in the pig latin program. Shows up as earn!lay
 
#include <iomanip> #include <iostream> #include <string> const int Characters = 100; char Sentence = {'\0'}; void pigLatinString (); size_t pos = 0; ...
[1 reply] : I don't see where you are printing !, so it must be part of the string... (by SamuelAdams)
by UCLA
What is "namespace clt and dmp"?
 
I'm trying to implement a vector in c++. Found this online: http://doingmyprogramming.com/2013/06/25/implementing-a-vector-in-c-working-smarter-not-harder/ ...
[1 reply] : Looks like he found the answer http://stackoverflow.com/questions/319... (by SamuelAdams)
Window to Window QT Creator
 
Assume, I have a form with a single button "enter". Now what I want is when I push enter I want another new form with other components. But I do not want the o...
[2 replies] Last: Thanks, I imagine the same logic applies in QT Creator or Visual Studi... (by csstudent123)
programs only prints part of the results/simple tasks
 
This is my program -- I am experimenting with data type sizes. Unfortunately I am getting strange results, and would like your help as to what to do: #inclu...
[9 replies] Last: I checked my code and execution with IDEONE and it had no problem with... (by technologist)
by samrux
A beginner's stupid cmd game. I am looking for advice.
 
I started to learn to program a couple years ago as a hobby. Up to this day, I like, every few months, messing around making games that work on Windows' CMD. I...
[no replies]
Help___ about bool function
 
class Iterator { private: Node* position; List* container; public: bool equals(Iterator b) const; } bool Iterator::equals(Iterator b) const { return positi...
[1 reply] : (position == b.position) is an expression with the binary operator ... (by xismn)
assistance with input file not working
 
My console output is all jacked up; my averages are way off and the stuID are not accurate. although the output file got written to fine. #include <iostream...
[3 replies] Last: Sorry, I meant total - I looked at the wrong variable by mistake.... (by LB)
Validating User Input
 
Hi, everyone. I'm having trouble trying to build a function which validates user input as follow... I think I know where the problem is, but I have no idea how ...
[4 replies] Last: Yup, now it works perfectly, thanks a lot! :) (by sasauke)
[Error] expected unqualified-id before 'switch'
 
Hey im new on this forum and tried to code a little calculater but the compiler gives me the error "expected unqualified-id before 'switch'" The code: int z...
[2 replies] Last: Here, I had to edit the code quite a bit, because there were multiple ... (by sasauke)
by iydh
WHILE and INFINITE LOOPS
 
Hello guys! I need your help. I keep getting infinite loops when ever my answer is out from Y or N. #include <iostream> using namespace std; int main(){ ...
[2 replies] Last: To fix the infinite loop you could put the cin >> answer; statement ... (by sasauke)
Pass multiple arguments to member function with pthread_create()
 
Hi everyone, I am having problems with c++. I am trying to call a member function in a class from another member function in the same class with pthread_crea...
[5 replies] Last: Thank you very much for the help and the advices too. I finally used C... (by dariodem)
how to make the decryption program?
 
Hello there ^^. I made an encryption program that successfully encrypts data but my problem is this: How to create it decryption program? Looks like because I ...
[7 replies] Last: You are totally right. I am gonna fix this thanks a lot . (by EnVdaProgrammer)
by AldenB
Weird Linker Error
 
I was going back through Principles and Programming by Stroustrup and after completing the chapter 6 exercise I was left with these weird linker errors with ve...
[2 replies] Last: You're awesome it worked perfectly! Thank you so much. I can't believe... (by AldenB)
can u solve this?
 
write a c++ program to create a class STUDENT with data members : USN , name and age and member function : get_data() and put_data.This program will get the stu...
[3 replies] Last: Sorry to tell you but it looks like an exercise. (by EnVdaProgrammer)
Vector of encapsulated references
 
I've currently got an interface (all functions pure virtual) called Base (which inherits from sf::Drawable and sf::Transformable), and several derived classes w...
[6 replies] Last: That's strange, I was sure I tried that. Thanks anyway, it must have b... (by shadowmouse)
by Vangy
Mastering the C++
 
Hello Im nearly done with c++ primer and i want to know if i should read another book about c++ and master c++ as much as i can or go with something else. I c...
[7 replies] Last: When you're finished with Effective C++ you'll know much more, ask aft... (by Gamer2015)
Destructor question
 
Hello, I implemented class destructor as doing nothing that is: inline ~ChannelFlow(){}; It seems that during runtime this destructor still calling dest...
[2 replies] Last: Thank you! (by stridder)
by mnm71
Why this type having ERROR??
 
I want to define function in class Region but line 4 and 1 (in regio.cpp) doesn't mach what am I missing?? class Region { public: Region(); void htonHeader(...
[5 replies] Last: @zhunge thank you my problem was solved...... (by mnm71)
Template/Stringstream run-time error;
 
Calling a template function causes a run-time error of freezing Could anyone help me debug this I've spent around 30 minutes on this and I isolated the pro...
[17 replies] Last: Sorry I didn't get the e-mail for these replies. I completely agree ... (by BarelyOtaku)
by Toddig
expected initializer before ...
 
I'm just trying to create a basic inheritance and I get the initializer error at the TriangleObject line. #include "Shape.h" #include "Rectangle.h" #incl...
[1 reply] : Please copy and paste the exact error message. triangle1Object is n... (by LB)
August 2015 Pages: 1... 1011121314... 17
  Archived months: [jul2015] [sep2015]

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