General C++ Programming - March 2013 (Page 14)

by AceK
HOW CAN I INITIALIZE DATA MEMBERS OF A VIRTUAL CLASS?
 
Hi everyone, I have a virtual class "Shape.h" and four other classes inheriting from "Shape.h". The other classes are "Circle", "Ellipse", "Square" etc. The pro...
[2 replies] Last: class Shape{ private: length width; colour border, fill; public... (by ne555)
Object Oriented C++
 
Could anybody check my coding? Why it didn't give the actual amount (logic err)? I need to include instructor/destructor. Tqvm! #include<iostream> #include<str...
[7 replies] Last: You didn't assigned name and plate_num anything. Local variables with ... (by MiiNiPaa)
Add code to existing EXE
 
At school we have been hearing about this in lectures of system protection and since I've never came upon this before I was wondering, is it possible to actualy...
[10 replies] Last: As I say (and not I was quoted for): It is like self-extracting arch... (by MiiNiPaa)
Strings
 
So I have a std::string and depending on the users choice I use switch to assign different strings to it, then I pass this ("images/" + strT + "T.png") as a par...
[no replies]
Arranging
 
If you have several pairs of squares and to each side of the square must be numeric. Together how that number is the same side of the face. Please help me ...
[1 reply] : Actually asking a question may do more for you than posting the same t... (by cire)
Could someone please check this plane definition
 
I'm not very good at math, but from what I've gathered from the internet this is how I could define a plane from three points (in 3D). struct vertex3 { ...
[3 replies] Last: ^ the coordinates of the point that you are testing to see if it is in... (by ne555)
by hbkmad
error LNK2019: unresolved external symbol
 
Hello I tried to look in other questions but I didn't get the answer. I still can't understand when exactly this error shows up and now it is in my code. The...
[3 replies] Last: you have declared it. http://www.cprogramming.com/declare_vs_define.... (by MiiNiPaa)
Can a friend function work for two classes?
 
If yes then how?
[6 replies] Last: OR another example: #include <iostream> class Common { public: C... (by Stewbond)
by Bribee
c++ class help
 
hello everyone i need help creating a program using while that terminates the loop when two intergers any two between 1 to 100 are equal with each other assig...
[2 replies] Last: You PM'd me about how to put this into a program: int main() { i... (by Stewbond)
about string streams?
 
ive googled them, but i cant find a good explanation of them. what do they do that class istream doesnt?
[3 replies] Last: > what do they do that class istream doesnt? Nothing, except for a cl... (by JLBorges)
by Snaksa
C++ Linked List Sort by Age
 
Hi guys! I'm new to this Forum and this is my first topic.I'm learning C++ for around 5 months just for fun - this is something like a hobby to me. Everything w...
[13 replies] Last: Thank you very much for the help guys :) (by Snaksa)
by CroCo
linked list & a copy constructor?
 
I'm trying to do deep copy for my constructor List::List(const List& list) { if ( list.empty() ) { this -> _pFront = 0; this -> _pBack = 0; re...
[4 replies] Last: @ne555, thanks for helping. I should include the entire code to let y... (by CroCo)
Extremely large integers in C++
 
Hi! Does anyone know if it would be possible (and how) to use extremely large integers in a C++ program (such as 20 million digits)? Any tips would be apr...
[7 replies] Last: @DeXipher A pro library like the one linked to above is best, however ... (by closed account D80DSL3A)
Need assistance with input from file with delimiters
 
I am working on an assignment and I have to read in data from a file about chemicals and store the data as chemical objects in an array. I'm having trouble rega...
[1 reply] : State NORMAL: read one character at a time, if comma or line end is en... (by MiiNiPaa)
Interesting Optimization Problem
 
Hi! In an application, I have come across the following interesting problem. There are 'n' integers x 1 , x 2 , x 3 , ... x n . (0 < n <= 60) and (200 <= x i...
[2 replies] Last: ok will do so, thanks jlborges (by abhishekm71)
SFINAE of incomplete types
 
My head will explode. I don't find anything wrong in the following code. Output must be: 1 0 but it is: 0 0 What is wrong? #include <iostream> #i...
[2 replies] Last: Using SFINAE: #include <type_traits> #include <vector> #include <list... (by JLBorges)
by dahin
How can I calculate PCA?
 
I am trying to use PCA, but it gives memory access violation error. Here is my sample code. int main(...) { ................. vector<float>input_array; f...
[no replies]
Setting Up Your Own Rules?
 
Is there anything in C++ where you can set up your own rules within the language to take place before compiling the language?. For example, if i wanted to make ...
[2 replies] Last: Anything in class if declared constant cannot be changed. There is a s... (by Rehan FASTian)
trial game collision detection problem
 
Hello! I have just started using Allegro to create a simple game and I'm having problems with the collision detection. here is my code void InitBad(BadGuy &...
[no replies]
by nunks
Slidding puzzle program
 
Hello guys the problem is my program is trying to implement the slidding puzzle algorythm but so far i come across a problem which is i can only get it to work ...
[no replies]
March 2013 Pages: 1... 1213141516... 51
  Archived months: [feb2013] [apr2013]

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