General C++ Programming - November 2013 (Page 37)

by dkaip
How i can deposit vectors with different objects?
 
Hello. I my code i have a base struct ... Then others structs made ... struct base{}; struct a1 : base { int a; int b; }; vector<a1>v1; st...
[14 replies] Last: Also in code of SneakySnake some questions. How i can externaly swap 2... (by dkaip)
Help With Program
 
s
[4 replies] Last: alright. Thank you so much (by blackmagic24)
by j2013
why the answer is zero
 
Hi, anyone know how come the answer is zero #include <iostream> using namespace std; class Shape { public: int findArea() { return 0; } }; class Squa...
[4 replies] Last: http://www.cplusplus.com/doc/tutorial/polymorphism/ LEARN!!! (by sherre02)
Changing const int value?
 
#include <iostream> #include <iomanip> using namespace std; // cin.get() <-------------- used to let the user read the screen // Function prototypes v...
[1 reply] : If you want to change it, it can't be a constant. (by sherre02)
C++ exception stack tracer (debugger)
 
Hello I want to inform you about a new debugging tool to sample. I give you its sourceforge short description: This library, linked with C++ code, using G...
[1 reply] : Hello again I want to inform you about the new release of libcsdbg, h... (by tasos42)
Virtual mouse help needed
 
Hi, I am trying to build hand gesture based application to control mouse. I have succeeded in moving mouse with finger co-ordinates. But when I try clicking ...
[no replies]
Error Returning an Array
 
On the return line I get: error: invalid conversion from 'char (*) ' to 'char' I've read about similar errors that had to do with pointers, but I don't underst...
[5 replies] Last: Yes. (by LB)
Class: member function print() not printing data..
 
.h file #ifndef __lab4b__taskList__ #define __lab4b__taskList__ #define MAX_CHAR 100 #include <iostream> using namespace std; // Define a structure to use ...
[3 replies] Last: Thank you!! (by Bdanielz)
Data Cleaning
 
Greetings all hope you are staying low on the glycemic index....I'm trying to do some data cleaning and need a bit of advice. I have a .txt file that I need to ...
[4 replies] Last: thanks so much (by chasecb)
Access 'X' member in typedef std::vector<sf::Vector2i> FramesCoords
 
Hi. How can I access to 'x' member from sf::Vector2i in my typedef? I try this, but doesn´t work: typedef std::vector<sf::Vector2i> FramesCoords; FramesCoord...
[6 replies] Last: @OP: for some reason you've got a pointer to a vector. In order to use... (by ne555)
ltrim and rtrim as standard methods in string class
 
Hi everybody From time to time I see others, and myself, writing, again, a way to get rid of leading and trailing blanks in a string. When I moved to C++ from ...
[13 replies] Last: > And I thought C++ programmers care about performance, cough cough...... (by JLBorges)
unique_ptr and template
 
Quick question: #include <iostream> #include <vector> #include <memory> struct Base { virtual void f() { std::cout << "Base\n"; } virtual ~Base...
[10 replies] Last: A dynamic cast on a pointer results in a new pointer being created; fo... (by JLBorges)
digital clock
 
Getting a compilation error; It says ''reloj'' is undeclared (first use this function). expected ; before ''reloj'' thanks #include<iostream> #incl...
[5 replies] Last: What are those square brackets doing after time rolej ? (by Mats)
String does not name a type?
 
Well this is an awkward error during compilation... I'll just let you look at the code, says the error occurs at line 14. #ifndef SIMPLE_LOAN_H #define S...
[1 reply] : Can you please post the exact error message. (by kbw)
by aj3423
permutation for two different list
 
Hi, I got a permutation question, I got two different std::list: list<string> slist; slist.push_back("str111"); slist.push_back("str222"); slist.push_back("st...
[5 replies] Last: Well, since I've already been driven insane making this, I may as well... (by helios)
Circular Template Arguments
 
Today I faced a problem where I had circular dependency in my template arguments. I was trying to make a class hierarchy similar to: template<class BType>...
[6 replies] Last: Yeah I agree..... I didn't see it at first.... My head was stuck in a ... (by pilotmm)
Can't use System commands
 
So, as far as I can tell, this code should run a system command from the C++ program: system("ping 192.168.1.2 /t /l 32768"); However, I just keep getting a...
[1 reply] : system() is a function of the cstdlib (C++) / stdlib.h (C) so y... (by condor)
by bugsy
Primary expression error
 
Hello everyone i need assistance. Im getting a primary expression error on the 11th line, and i dont know how to fix it. Please help me include <iostream> #...
[3 replies] Last: You have to give arguments for the function. Just restating what the t... (by Jakssoul)
by wkust
Accepting Specific strings
 
I am quite new to programming in Cpp and I cannot figure out how to get the program to deny "B" as a value for cat. I want it to only accept "Ba". Is there way...
[1 reply] : For one, your line 7 should be cin >> cat; But when I compile the pr... (by Jakssoul)
SFML 2.0 Opengl problem
 
i was trying to combine opengl with sfml and the code worked but it can't draw anything to it. my assumption is that i need to pop and push opengl states but i ...
[3 replies] Last: I used this as a reference, it has a triangle in it: https://github.co... (by LB)
November 2013 Pages: 1... 3536373839... 46
  Archived months: [oct2013] [dec2013]

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