49,761 Topics

Member Avatar for
Member Avatar for Dani

[B]ADT.h[/B] [code] struct process { int pid; // process id char* file_name; // file name of the process to be run int cpu_time; // amount of time the process needs with the cpu int request_priority; // priority from 1-5 (higher is better) int pr; // adjusted priority rate }; /**********************************************************************/ …

Member Avatar for Fbody
0
1K
Member Avatar for 28daniela28

I have the following code ( I'm creating a binary tree and then I want to print the values on it's leafs) but when I'm running it, it never enters in that if from the parcurgere function. What have I done wrong? [CODE]#include <iostream> using namespace std; class node { …

Member Avatar for 28daniela28
0
137
Member Avatar for walter clark

I have about a year of full time experience with Visual C++ 2008. I am productive but I'm still frustrated with the debugger. Is this the right forum to get help with the debugger? My biggest problem is not seeing any value when the variable is deeply burried within an …

Member Avatar for walter clark
0
122
Member Avatar for WolfPack

Is it possible to read data from a binary file to a C++ class using [inlineCODE]istream::read[/inlineCODE]? I know it can be done for structures, but I couldnt do it for a class. [Edit] Want code? [CODE]#include <iostream> #include <fstream> class BITMAPFILEHEADER { private: char type[ 2 ]; // Magic identifier …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for nayadin

1) The class interfaces do not follow good object-oriented design principles, which make them bug-prone and hard to extend/subclass properly. Improve the object-oriented design of the classes. 2) The class interfaces are almost completely undocumented. Include proper interface documentation in the .h-file. 3) There seems to be a bug somewhere, …

Member Avatar for VilePlecenta
-1
373
Member Avatar for cnidhi007

Hi! I want to read a dbf file in c/c++/vc++. Which platform would be ideal? And how should I go about it? Regards, Nidhi

Member Avatar for Salem
0
250
Member Avatar for iammfa

since few minutes I tried practice "static_cast" to convert from short variable to int variable, I wrote this trivial program to print the variables before using static_cast and after using static_cast in console screen, but the variable not converted..! [CODE] //EGYPT population | static cast #include <iostream> using namespace std; …

Member Avatar for mrnutty
0
88
Member Avatar for Evan M

I've been messing around with c++ and attempting to fully understand certain behaviors. Given the following program: [code=C++]#include <iostream> class Test { public: Test(); ~Test(); void func(); }; Test::Test() { std::cout << "Constructor" << std::endl; } Test::~Test() { std::cout << "Destructor" << std::endl; } void Test::func() { std::cout << "Deleting …

Member Avatar for Evan M
0
106
Member Avatar for tanu4m

Create student class to store id, name and phone number. Derive this class as report to store id, name, phone number, mark1, mark2 and mark3. Write constructor, destructor and methods to take data and print data. Also write a method to print total mark.

Member Avatar for Ancient Dragon
-1
88
Member Avatar for downtimedk

Hi Guys. I made a WIN32 program in VS C++ Enterprise 2008. It works fine but I need a good example on how to implement a file open function via my menu. Anyone have a good example? Kind regards Kurt

Member Avatar for Ancient Dragon
0
282
Member Avatar for nick30266

i open the program go to [B]file [/B]and when i press [B]open[/B] the program stop working saying that the program has stopped and then close. everything else is fine. i installed the program again but the same. the same program work without a problem in other computers. i think it …

Member Avatar for Ancient Dragon
0
64
Member Avatar for mimis

Hi, I want to make a global 2D array ( i mean outside of the main function), so it will be available from all the functions. But my problem is how can i read it's size from the keyboard? If anyone know, plz help me. Thanks in advance.

Member Avatar for Fbody
0
94
Member Avatar for mmasny

Would you be so kind and help me solve this problem? [code=C++] #include <string> using namespace std; class Okno { protected: int x1,y1,x2,y2; string nazwa; public: }; class NieDesktop : public Okno{ private: Okno& ojciec; NieDesktop(const NieDesktop&); }; class OknoWlasciwe : public NieDesktop{ OknoWlasciwe(const OknoWlasciwe&); public: OknoWlasciwe(Okno&,int,int,int,int,string); }; OknoWlasciwe::OknoWlasciwe(Okno& _ojciec,int …

Member Avatar for mmasny
0
301
Member Avatar for lipun4u

[QUOTE]The static_cast operator can explicitly convert an integral value to an enumeration type. If the value of the integral type does not fall within the range of enumeration values, the resulting enumeration value is undefined.[/QUOTE] Can somebody explain the above stuff with example ??

Member Avatar for lipun4u
0
72
Member Avatar for VilePlecenta

On the left is the dialog ran from VC++ On the right is run from my app [url]http://img208.imageshack.us/img208/2019/wonder.png[/url] Why the version ran from my app lacks is: Combo Box Options Color, Design is from the 90's style

Member Avatar for VilePlecenta
0
266
Member Avatar for shizu

Hi All.. I am using Microsoft Visual C++ 6.0 to build a software.. during software running, sometimes will happend application error, and force to shutdown the program. The application error detail like below.. Date : 1/25/2010 Source : Application Error Time : 2:14:09 PM Category : None Type : Error …

0
53
Member Avatar for Jerail

... and I don't know why. I'm just getting back into C++ programming after years of not using it at all. I tried to make a simple program that - Creates 10 random numbers between 0-99 and prints them - Categorizes each number by range - prints the sum of …

Member Avatar for Jerail
0
422
Member Avatar for ttunstall07

This is the problem im working on: *Write a program that has nested loops *First, write the inner loop -Use “for” loop to display Hello two times *Second, write the outer loop -Use “do while” loop to display the inner loop three times -Before the output of inner loop, you …

Member Avatar for WaltP
0
120
Member Avatar for XStrong

[CODE]/* #include <iostream> #include <iomanip> using namespace std; int main() { cout << " " << endl; double sum; double numb; double ave; int counter = 0; cout << "This program averages numbers." << endl; cout << endl; while (true) { cout << "Number: "; cin >> numb; if( numb …

Member Avatar for thomas_naveen
0
152
Member Avatar for mevkurray

Hi all. Im developing a qt app to use on a wince device. I have compiled the OpenSource version of Qt for winCE, and it is working. My program compiles fine. However, if i have any slots defined in the header file, it throws the following linker error: moc_updatedialog.obj : …

0
72
Member Avatar for atticusr5

hey everyone, I got a weird error when I run my program. I compile and link and run the program through the terminal in Ubuntu. I have to compile or linking errors, and the program run's fine, except when the program asks: "Would you like to see a display of …

Member Avatar for atticusr5
0
85
Member Avatar for isralruval

im having trouble with my program. it reads the student id, and both grades from a file and then a function its suppose to calculate the average of both grades and then pass the results to the main program using pass by reference. And for some reason my average its …

Member Avatar for jonsca
0
102
Member Avatar for Xorifelse

I've searched the forums a bit but I couldn't really find anything relative to this matter. I'm relatively new to C++, and I always used cout and cin. But I find the syntax style a bit off, so I was searching for alternatives and found scanf, sscanf and well printf. …

Member Avatar for WaltP
0
138
Member Avatar for ayushii

[I]<<split from [URL="http://www.daniweb.com/forums/thread257500.html"]here[/URL]>> [/I] plsssssssss help me guys ..... i want a c++ code for arithmetic & scientific calculators individually,..... plsss help... i need it within a few days.......plsssssss

Member Avatar for WaltP
-5
99
Member Avatar for abraham james

Write a program based on the agent model in which two agents the farmer and agricultural officer converse over a disease that affects sheep.

Member Avatar for WaltP
-2
103
Member Avatar for jdpjtp910

I have a program for school that I need help condensing some code, if possible. I have structure that has 10 fields for a monthly budget. I will have the user input their current budget and then my program informs the user if they are over under their budget and …

Member Avatar for jdpjtp910
0
509
Member Avatar for lparras

I have a weird problem with destructors. My code works in older machines with g++-2.95, g++-3.3, g++-4.0, g++-4.0.1 and not in my machine with g++-4.4.1. Do you know why? Here I show a small example that reproduces the error (in my machine): [CODE] #include <iostream> class Matrix{ public: Matrix(){}; Matrix(int …

Member Avatar for Salem
0
113
Member Avatar for tux4life

Intended as a replacement for [URL="http://www.daniweb.com/code/snippet217322.html"]this[/URL] old crap of myself ;) Note: no error checking provided, if you need it, then you can easily implement it yourself :)

0
160
Member Avatar for Clawsy

Hello, I'm trying to get from the screen, the region, or rectangle (the coordinated) of the part that is being painted. For example when I move some window or I have some action on the screen I want to get only that part of the screen image that is being …

Member Avatar for Clawsy
0
1K
Member Avatar for StaticX

Hi, Im wondering if someone could clarify a problem im having. Basically im trying to figure out how i can go about having a Class A object as an attribute of Class B,while still using Class A's functions. For example if have a class called clockRadio.In turn i have another …

Member Avatar for StaticX
0
100

The End.