General C++ Programming - June 2010 (Page 3)

by mark12
determining how many odd numbers in 100
 
hey guys, can anyone help me?. i need a program that will count how many odd numbers there is from 1-100 using only ifelse statement or for loop..
[2 replies] Last: Double post: http://www.cplusplus.com/forum/beginner/25467/ (by firedraco)
Does private member of Base class is created in derived class object?
 
I'm trying to understand, need your help as i'm unclear Is private member of Base class is created in derived class? as i know private member of base clas...
[1 reply] : [quote=santoshkb]Is private member of Base class is created in derived... (by Galik)
by kulfi
Two Cpp Files
 
I am new to Visual Studio 2010 and i have two cpp files in one project now i can compile one file and run it but for the second i can not please can u tell me w...
[1 reply] : If it's in visual studio the compiler will compile both. What exactly ... (by RedX)
Food for thoughts -- polymorphisms in C++
 
Just a famous interview question.. What are the different ways you could iplemet polymorphism in c++?? All i know is 1. Through Interfaces 2. Templa...
[10 replies] Last: I guess helios has become busy..!! Hope he ll give us the explanation.... (by karthick88)
Capture, Delmiting, Parsing, Mapping and Publishing
 
Hi, I am very new to C++ and have been assigned the following project this summer. I have to capture real time data which is displayed on a GUI. This informa...
[1 reply] : What have you done so far? We won't do it for you but we can help with... (by RedX)
Polymorphism: Accessing inherited class variable
 
Hi, I have a class that is inherited from an abstract base class. class CStateBase { friend class CApplication; friend class CGraphics; virtual int ...
[9 replies] Last: Getters that return a reference are totally pointless. If you're doin... (by Disch)
exception handling
 
can we throw different type of object in re throw ? i dont understand what re throw means.. amd hence the answer for this question.. Would be great if someo...
[10 replies] Last: [quote=karthick88]The above code causes System.DivideByZeroException (... (by m4ster r0shi)
by declan
Handling the SIGINT interrupt signal
 
Hey guys. My program does long runs, and generates too much data to store as it goes along. It typically saves the info at the end, when it's done. However, som...
[3 replies] Last: Thanks Null, I'll take a look at that. And can we get an IP ban for... (by declan)
Contours in OpenCV
 
hi, i'm wondering if there are a manner to build a contours structure witch contain other contours?cause i want to extract contours from a subimage on a princi...
[2 replies] Last: @taikovic You tried setting the ROI you're interested in? Setting the ... (by utkarshsinha)
template trouble
 
Hi all, I'm trying to do something with templates, but I'm running into problems. I want to write an array class and write a constructor that takes N arguments...
[6 replies] Last: I wish there was a clean way to initialize an array and use it as fun... (by firedraco)
Creating char array from address
 
C++ and its handling of variables and pointers is still very strange to me. Right now i have ProgramA written in vb.net and ProgramB written in c++, ProgramA al...
[1 reply] : In C++, when you add to a pointer, really the size of pointed object i... (by hamsterman)
by Kyon
Type Cast Overloading
 
Heya there, I'm currently working on a header file which does some basic vector maths. I was wondering if it is possible to convert an instance of a custom clas...
[2 replies] Last: That did the trick, didn't know type cast overloading was part of the ... (by Kyon)
function returning pointer of its local vairable
 
Can some body please help me understand the output of this c++ programs , its giving erratic results #include <cstdio> #include<iostream> using namespace ...
[3 replies] Last: Well you can return a pointer to data allocated from the free-store wi... (by Galik)
Problems with char arrays in dynamic memory...
 
Please check out this topic and help me out if you can. Thank you... http://www.cplusplus.com/forum/beginner/25429/ OK, I'm probably breaking several rules h...
[1 reply] : Congratulations! You just got yourself this unhelpful message! (by helios)
operator overloading
 
Hey everyone, I have a general question about operator overloading. I am taking a data structures class this semester, and I am suppose to make a morse code pro...
[2 replies] Last: Ha I guess that does make more sense. Thanks for the response. (by followtheapples)
by Kat007
Neural Networks and Genetic Algorithm
 
Could somebody please explain the difference between these 2? Is Neural Network a general term and GA more specific? How exactly do they differ please? Thank ...
[1 reply] : This is a C++ forum but... Is Neural Network a general term and GA m... (by KarlisRepsons)
A Memory allocation question in exceptions.
 
try { void someFunction() { .... throw "Exception"; } catch (char* exc) { ... } } Above, a string will be created an...
[9 replies] Last: Try: throw DriverNotBlocked(); EDIT: Yep, you got it. (by moorecm)
Optimization question
 
Hey guys! Lets take a look at this code: void DoSomething() { //Something is done here ;) } class Base { public: Base(void (*function)()) : f...
[8 replies] Last: That depends. If the function pointer is in a local variable on the s... (by jsmith)
One more Interview question on new operator Overload
 
when you will provide overloaded new operator. give example
[15 replies] Last: @everid .. Can you explain me a bit more? l you can allocate an ... (by karthick88)
by jefe9
Stack Overflow error
 
I am using the Bloodshed Dev-C++ compiler and am getting a stack overflow error. Does anyone know which compile /link flags i need to use in project options ...
[10 replies] Last: Well, that's not really the same. is syntactical sugar for accessin... (by helios)
June 2010 Pages: 12345... 18
  Archived months: [may2010] [jul2010]

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