49,761 Topics

Member Avatar for
Member Avatar for LevyDee

Hi all, the setup is as follows: -One base class -My top layer class that holds: -Four derived classes from said base class(four different types of objects that all derived from my base class) Is it possible to have a function in my top layer class that has one object …

Member Avatar for LevyDee
0
93
Member Avatar for freakyboard

[CODE]class x{int a;}; class y:public x{}; main(){y k; k.a=3; } [/CODE] How can I access "k.a"? PS: You can't change or omit any part of the code. a have to be private. Member access specifier have to be public ( class y::public x ). You can add functions to x …

Member Avatar for embooglement
0
121
Member Avatar for matthewkeating

Hello, I am looking into testing the performance of different numerical datatypes like double, integer, float, etc and see which one is the fastest. Is there a way to do this in C++. Time the time it takes to do basic arithmetic with numbers. Starting and end a timer within …

Member Avatar for mrnutty
0
126
Member Avatar for MasterGberry

I know there is an easy way to do this in C#, but i was wondering about C++. If I want to have an ifstream object defined that will read the input of a file, but i want it to read backwards. So basically here is the format I have. …

Member Avatar for MasterGberry
0
102
Member Avatar for Juginx

Hey First: How to get Length of textbox(how much sings have text) @edit : NVM first! Secound: I have Film Duration 00:00:22 and i must add that to xx:xx:xx how i can do that?

0
59
Member Avatar for COKEDUDE

This does a nice job of explaining headers. [url]http://www.codeguru.com/forum/showthread.php?t=344569[/url]

0
66
Member Avatar for MasterGberry

I am getting external link errors with the static consts below. Couldn't figure out what to do, would appreciate help :) [CODE]// Declartion of Order class class Order { private: // all of the different combo #s int a, b, c, d; int e, f, g, h; int i, j …

Member Avatar for MasterGberry
0
140
Member Avatar for Stefano Mtangoo

forgive me buddies if it is childish question, I cannot find good tutorial explaining it. So bear with me. My questions are, how does forward declaration differ from normal include which I'm used to? Also, where do we use it and what are limitation of the two? Lastly is there …

Member Avatar for Narue
0
104
Member Avatar for Jelte12345

I would like to know how to check for a keypress/keydown, so I can pause a loop when that key is pressed. I found something on the [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keypress(v=vs.71).aspx"]msdn website[/URL], but I don't really understand any of that. Can someone explain it to me in newb language? Or show a piece …

0
53
Member Avatar for L.sha

Hey, I Have a code to implement digital logic circuits , using linked-list. I have managed to build a simple program to work on 3 gates, which gives the user the option to choose between the gates and enter the kind of operation he wants and the values also. The …

0
74
Member Avatar for indr

hi, i created a linked list. it just adds values to the list called "source" and copies it to another list called "destination", it also deletes the values which is found in the source list and prints the source list again. link_list.h [CODE] #ifndef LINK_LIST_H #define LINK_LIST_H class link_list { …

Member Avatar for indr
0
221
Member Avatar for Jelte12345

I am creating a creating a program which needs the ability to make the get stream pointer jump to a specified line in the textfile it has opened. For example line 153. The lines have a variable length and contain only numbers. Is there a way to do this and …

Member Avatar for arkoenig
0
558
Member Avatar for Cup of Squirrel

Ok, time to get off my ass and learn C and C++. However, I'm having a bit of trouble finding a free compiler; I'm a newbie so it needs to have a friendly and explanatory GUI if possible. Just post name and/or link, thanks :D

Member Avatar for mslade
1
2K
Member Avatar for kunal2020

hi ,, i am kunal ,, n m a 3rd year b.e. student ,, really in need of mini projects on c as well as c++ .. can u plz plz help ??

Member Avatar for Celtrix
-1
113
Member Avatar for johnray31

Hi guys, I was trying to use inline function and i put inline function definition in .cpp file by using inline keyword like below.. [CODE] class SomeApp { private: SomeApp() { } public: returnType_t SomeState(); }; inline returnType_t SomeApp::SomeState() { code lne 1... } I was trying to access SomeState …

Member Avatar for Fbody
0
284
Member Avatar for viandante

Hi all, I am trying to modify sqliteman. I need to add a module able to import plug ins made in python. Mainly, this is in order to have some sort of powered Excel where data are stored in a DB and macro are written in Python and can have …

Member Avatar for viandante
0
125
Member Avatar for AmerJamil

first of all please any one tell me what is a armstrong number. i have a problem statement in c++,cant find any logic to work on it.. can any one give me some hints to do it? please also explain my problem statement in simple wordings thats whats my problem …

Member Avatar for Ancient Dragon
0
157
Member Avatar for Juginx

Hey again :p I use OpenFileDialog to open files. When i open file then how i can get that length video.(i open video files)

Member Avatar for Juginx
0
124
Member Avatar for cjjack88

Hi, I am doing an assignment about binary search tree. I have problem with remove the root in binary tree. When i remove the root of the binary tree and I view the binary tree in In-Order Traversal, my program will stop running. [CODE]void myCarSystem::remove(string m) { //Locate the element …

Member Avatar for troyduff281
0
3K
Member Avatar for ashishchoure

Hi Guys, Is this right to say Heap is RAM and Stack is Pagefile(HardDrive)? Sorry for silly question. :?:

Member Avatar for ashishchoure
0
167
Member Avatar for TSims11

Hi again, I've run into a problem with an if statement in my code. Here is the code: [CODE]private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { if ((textBox1->Text == ("")) && (radioButton1->Checked == false) && (radioButton2->Checked == false) && (radioButton3->Checked = false)) { Form3 ^form3 = gcnew Form3(); form3->Show(); } else …

Member Avatar for TSims11
0
106
Member Avatar for ethanbuckley

Im stuck on a bit of code which I am re creating from a reference code given to me by my teacher. I have the following line that is giving me 6 errors: [CODE]this->Load += gcnew System::EventHandler(this, &EditWaveTrack_form1::EditWaveTrack_form1_Load);[/CODE] [ICODE]Error 1 error C2039: 'EditWaveTrack_form1_Load' : is not a member of 'WaveMachine::EditWaveTrack_form1' …

Member Avatar for jonsca
0
247
Member Avatar for goldman480

Hi all. can anyone help me correct errors in my code which is not running anymore and i dont really know why. If anyone can notice anything which shouldnt be in the code let me know please. I would really appreciate any sort of help. [QUOTE]Before writing your code you …

Member Avatar for jonsca
0
167
Member Avatar for gth759k

Hi, I need help with a simple problem. I'm still new to c++ but this should be fairly straightforward. I just need to generate a random number, but with only a very small range like ... 0.00001 to 0.001. Any help would be appreciated. Thanks.

Member Avatar for Zjarek
0
79
Member Avatar for dophine

Hi All, I just read the book called "C++ coding stardards - 101 rules". And Found there is something I don't understand. [CODE]class FlagNth { public: FlagNth( size_t n ) : current_(0), n_(n) {} // evaluate to true if and only if this is the n-th invocation template<typename T> bool …

Member Avatar for dophine
0
119
Member Avatar for alone882

Hi, I`m new here and, of course, have a small problem. I need to create a program with VC++ 6 Builder where: Press ENTER once - open picture, Press ENTER Twice - start a music. I can`t figure out how to check if user press ENTER twice, can anybody help …

Member Avatar for jeff.reith
0
320
Member Avatar for ChEeZeBaLL

I've found many tutorials on writing IRC bots and I think it would be nifty to code a simple chat bot for [URL="http://www.tinychat.com"]tinychat[/URL] I was thinking something with basic greet functionality and maybe being able to tell you what the weather is going to be. I have no idea where …

Member Avatar for ChEeZeBaLL
0
178
Member Avatar for gilly231

Hi, i wish to store a mix of derived classes in one array. so i make the array from the base class i.e. Base* array[11]; and fill it with my classes. The base class has a method. Base::print(); this is overridden in all the child classes and used as follows, …

Member Avatar for gilly231
0
147
Member Avatar for Elgan

Hello, I am trying to read some words from section in an INI file. Then putt hem into a vector of a section vector, This is the struct and class def [code] struct elgbotsections_t { char name[30]; vector <string> phrase; }; class ElgbotManager { private: char * filename; public: ElgbotManager( …

Member Avatar for Elgan
0
222
Member Avatar for kotddanny

Fellow C++ citizens, I am very new to C++ and am trying to do the following: I want to transform a chart into code. Basically, the chart serves as a diagnostic reference. For an example, if a certain condition is below a certain value, there would be a few issues …

Member Avatar for kotddanny
0
131

The End.