General C++ Programming - April 2008 (Page 5)

Multiple and virtual inheritance - dreaded diamond
 
#include <iostream> class Base { protected: int data; public: Base () {} Base (int d) { data = d; } virtual ~Base () {} int ...
[15 replies] Last: Yes, thats right. I suggested work around of InitVars() for calling ... (by satm2008)
INTERESTING
 
#include<iostream> using namespace std; int main() { int x; { int x=4 } cout<<x; system("pause"); return 0; }...
[1 reply] : When you do not initialize a variable in the local/automatic memory sc... (by satm2008)
Aktive Proses Cheking
 
Hello,how could i check if a proses is already started or not. i am writing a programm that must start when a third party programm starts. So my programm must c...
[1 reply] : what do u mean by a third party program? and, what kind of OS do u us... (by guruplus)
How do you increment a linked class variable in a loop?
 
The point of my project is to make a list of variables that are taken from another class, WordCount and print them to an output file. WordCount simply stores a ...
[1 reply] : One solution is to use one of the standard container classes, such as ... (by Faldrax)
Bisection method to find roots? need some help...
 
Hey guys, I'm working on a problem where I need to use the direct-search method to find the intervals of the roots and bisection method to find the roots of ...
[no replies]
fstream question
 
I have this program that writes to a file to keep a track record, however, each time I open the file, the value that was in the file before is replaced by a new...
[4 replies] Last: Both in and out methods in the file would not work, unless the file wa... (by satm2008)
by stn
atl project, dll, registry
 
Hallo. I have a problem to register a dll file (in windows registry) on a different computer than on the one the porject was built.The dll file was created by ...
[no replies]
The program crashes (1,2)
 
Hello! Can anyone pease tell me what is wrong with this program? #include <iostream> using namespace std; enum tToken { PLUS, MINUS, MUL, DIV, L...
[26 replies] Last: It is basically a "Recursive descent parser", if you Google it you wil... (by closed account z05DSL3A)
HelpPlsHow to convert large chars to integer and hex
 
Pls. help me I need to convert large char to numeric and hex, below are the requirements: input: char var_char = '9999999999999999' ---16 max length-- ou...
[7 replies] Last: got it working on bit64 system ... thanks really appreciate your suppo... (by swordfish622)
Why we can use ## like this?
 
Head File: #define CLASS_ITEM(name,price) class ITEM_##name { public : ITEM_##name(); ...... virtual ~ITEM_##name(){}; private: ...
[4 replies] Last: Thanks very much! It's clear for me now. (by purebel)
New to C++....Help please?
 
Here is my code. Im getting a error C2447: '{' : missing function header (old-style formal list?) error and i have no idea what this is. any help would be ap...
[8 replies] Last: I have only made the changes that are pointed out above and this compi... (by closed account z05DSL3A)
by DrDogg
Code for Thought: Inheritance, name lookup and access control.
 
This thread was inspired by http://www.cplusplus.com/forum/general/1363/ where, frankly, we all got rather confused. There were a variety of issues that I think...
[3 replies] Last: rpgfan3233: >> The order of name lookup? Not sure if I understand, ... (by DrDogg)
by funcky
virtual multiple inheritance
 
Hi i want to use multiple inheritance. but i get the following compiler error: error C2512: 'Object::Object' : Kein geeigneter Standardkonstruktor verfuegba...
[4 replies] Last: ropex: The order of the initialisation list has no impact on the order... (by DrDogg)
CONSTRUCTOR(OBJECT)
 
A CONSTRUCTOR IS A MEMBER FUNCTION THEN WHY DO U THINK OBJECTS CANNOT BE USED AS PARAMETERS.WE USE CONSTRUCTOR_NAME(OBJECT &); IN COPY CONSTUCTOR BUT NOT CONST...
[1 reply] : Because if it is not by reference, it has to be either 1. a call by ... (by msram)
s.o.s
 
I want to know how to develop a matrix calculator that preforms basic matrix operations usin g arrays and/or pointers. Iwant a calculator to do addition ,subtra...
[3 replies] Last: Good. Please post your solution/code here just as you did in http://ww... (by msram)
by nezi
Can we make a non-member function static?
 
In C++,Can we make a non-member function as static?If yes,then in which situation should we make such kind of functions?How do they work?What will be the releva...
[1 reply] : If you mean something like this: static void foo() { // ... }... (by ropez)
by nezi
Where to put the inline keyword (1,2)
 
With inline member functions that are defined outside the class,is it best to put the inline keyword next to the declaration within the class body,next to the d...
[22 replies] Last: Thanks to all of you for your great discussion about this topic.And I... (by nezi)
Simple If loops.
 
bool check(char score, int test) { if ( score = 'A' && test>= 90 && test <= 100 ) { return true; } how come when I do check('A', 79) It retur...
[2 replies] Last: can you get on aim? i want to show you what I have. (by cplutplut)
help in these problems
 
i want to know how to check that a data is interger or not ? & how to check that the file is empty & how to get the dimensions of a matrix in a file by using po...
[7 replies] Last: >"sscanf" returns the number of digits in the string. No, it doesn't.... (by rpgfan3233)
ARRAYS
 
case 1: char a ={'a','b','c'}; cout<<a; //displays abc case 2: int b ={1,2,3}; cout<<b; //displays address(0x2ff350) of pointer which points to b d...
[2 replies] Last: If you cast to a void*, you should be able to retrieve the address usi... (by rpgfan3233)
April 2008 Pages: 1... 34567... 11
  Archived months: [mar2008] [may2008]

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