49,761 Topics
| |
[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 }; /**********************************************************************/ … | |
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 { … | |
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 … | |
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 … | |
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, … | |
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 | |
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; … | |
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 … | |
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. | |
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 | |
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 … | |
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. | |
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 … | |
[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 ?? | |
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 | |
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 … | |
... 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 … | |
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 … | |
[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 … | |
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 : … | |
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 … | |
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 … | |
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. … | |
[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 | |
Write a program based on the agent model in which two agents the farmer and agricultural officer converse over a disease that affects sheep. | |
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 … | |
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 … | |
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 :) | |
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 … | |
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 … |
The End.