49,757 Topics
| |
when i run my code, i get lots of undefined class errors, even though i have defined and included the files properly(i think). here are the errors i'm getting: ------ Build started: Project: engine, Configuration: Debug Win32 ------ Compiling... baseentity.cpp c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\globals.h(13) : error C2079: 'CGlobals::controller' … | |
Hi there, I am trying to get my head around this simple program, but there are things that really don't make sense... here's the program: [CODE]// Fig. 3.5: fig03_05.cpp // Define class GradeBook that contains a courseName data member // and member functions to set and get its value; // … | |
Hello. I'm writing a manager class that should handle a vast and expandable group of classes. The manager class uses a hash_map to store all these etherogenous objects. The objects are all derivations of a base class Object, and of different "interface" classes which are used to define required functions. … | |
plz guide me i m having some error at line 28[CODE]#include <iostream> using namespace std; class str { char s[30]; public: str() { strcpy(s,""); } string getstring() { cout<<"enter the sting:"; cin>>s; return s; } void displaystring() { cout <<"the string is:"<<s<<endl; } string operator+= (string &t) { strcat(s,s.t); return … | |
I have read a lot of topics with these subject many of theme where on these forum but what ever i try i cant get this working. I have tried 4 or 5 function for converting string to float but i always get compiler error left from xxx must be … | |
If you have a form application and open another form from a buttoncontrol on "Form1", this will open another form but this form will also be in the "Taskbar" on your desktop. So you have 2 forms in the "Taskbar" (What I am after is to still only have one … | |
[CODE] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main () { srand (time(0)); int count = 0; int random_num = (rand () % 100) + 1; int high_num = random_num; int low_num = random_num; float total = 0.0; while (count < 100000){ count++; random_num = (rand () … | |
Can a variable declared as public be used in the main function? | |
Hi! I am quite an active programmer. I work allot for school so i need a good IDE. I a[COLOR="red"][/COLOR]m currently working on Windows with Dev C++. Dev is quite a good compiler and editor but IMO the debugger...sucks. So I would like to know your opinion on Dev, and … | |
Hello, I'm not much of a programmer and will probably never be, but am just curious. Can I initialize a pointer with a constant value different than NULL? I.e. can I tell my pointer to point at one particular memory cell? It's a number so why couldn't I? I know … | |
Hello. Can someone tell me what will happen if i have an array Ar[5][5] and a pointer ptr = Ar[0][0] and try accessing the second line of Ar throught ptr by increasing it by 5? I mean ptr+5 ==Ar[1][5] or something else? | |
I am making a scientific calculator as an assignment in my class. I am using switch case for all the operators like +-*/ , and I am calling them with a single keyword like '+' for addition and so on. The problem is that when i try to use more … | |
Hey guys, I'm new here. And I was wondering if you could help me with a question i have. You see i have to write a C++ program that plays the game of tic-tac-toe. And the class contains as private data a 3-by-3 double subscripted array of integers. And i … | |
I am trying to declare a Doublebuffered panel in C++ I can only find the declaration for this in C#. So I wonder how this could be converted to C++ ? [code] public class DoubleBufferPanel : Panel { public DoubleBufferPanel() { // Set the value of the double-buffering style bits … | |
I am trying to create an expression evaluator to expand my C++ knowledge. It is supposed to evaluate 5(x+7)-2. Here is the code: [code=c] #include <iostream> #include <stdio.h> #include <time.h> using namespace std; time_t now, later; void sleep(int delay) { now=time(NULL); later=now+delay; while(now<=later)now=time(NULL); } int main(void){ //It finds an error … | |
hi! I have created a class with 2 constructors and whenever i try to access it i got the error no match for to call int& here is the code [CODE]class A{ public: A(){}; A(int i); int moj_broj; }; A::A(int i):moj_broj(i){} int main() { A something; cout<<"before "<<something.moj_broj<<endl; something(5); cout<<"after … | |
need to change this from availcredit01.cpp to availseats01.cpp and make the necessary adjustments 1)ask user to enter the room size 2)get room size 3)ask user to enter number of students 4)get enrolled 5)set avilseats to room size minus enrolled 6)display the available sets 7)halt and return to operating system i'm … | |
Hey guys I need help with a program for school. It involves a menu to access sub programs and use of recursive techniques as well as 2D arrays and traversing. Here's the requirements: In this program, you are to create a menu-driven program that allows the user to execute one … | |
Hi All, When I try to compile the code below, I get error message " error: ‘MAX_IMG_HEIGHT’ undeclared here (not in a function)". I tried to declare them in different ways but it does not work. Does anyone have idea ? I appreciate for helps, The code is: [CODE]/* ImagExper.h … | |
Hi i'm writing this program where the user chooses whether to print out a square, a forward triangle, and a backwards triangle using the "*" character. I got the square and the backwards triangle to work and the forward triangle, but i cant figure out how to do the back … | |
this message is coming up i cant get it off ERROR C2447 [CODE]#include<iostream> using namespace std; int main(); { int item_purch, numb_of_purch, quit; char ('A' || 'a'), ('B' || 'b'), ('C' || 'c'), ('D' || 'd'); double mugs, teeshirts, pens, tot_mon, curr_cash, mon_spent; cout << "Welcome to the Southern Illinois … | |
I have a problem with flickering for a lot of buttoncontrols in a panel. I have put a panel on the form that holds 200 buttoncontrols. When switching from one panel to this panel, all 200 buttoncontrols flickers for about 2 seconds. I have red that if setting [B]DoubleBuffered = … | |
hi can some one help me I want to take url name in textbox from user and when he press enter key that url should open. I want code of this program in c++ visual studio 2008. | |
Hey guys, I'm almost done with my homework assignment in an intro c++ class. My assignment found here: http://faculty.cs.niu.edu/~byrnes/csci240/pgms/240pgm2.htm My problem is with the output of the roots. If you run my program with the same numbers as sample output #2 in the assignment, I only get one root to … | |
I need to make a program that takes one character as an input and instantly continues execution and the time limit for the user to enter that character is 2 or 3 seconds. please help me and if possible ppost an example. Thanks for your help. | |
Hello guys. I'm new here. I've got a problem with a CLR Windows Form Application. I've started to make Mendeleev Table , and i almost finished it. Here's a screenshot: [url]http://files.uploadffs.com/d/8/9b468fc8/screenshot.PNG[/url] I've tested it on my computer ( Debug ; starting .exe ; etc. ) , it works , but … | |
and this what is a better way too write this without getting an error if ((symb1 != 'A', 'a') || (symb2 != 'B', 'b') || (symb3 != 'C', 'c') || (symb4 != 'D', 'd'));; << endl; { cout << "Please enter an corresponding letter." << endl; } and this what … | |
Hello. I need an example of how to pass an array of pointers to objects as a parameter to a function or a constructor. It's urgent. Please help me. Thank you. | |
plz chk i want to overload compound assignment operator bt its gving me some error[CODE]#include <iostream> using namespace std; class strng { char s[30]; public: strng() { strcpy(s,""); } void getstring() { cout<<"enter the sting:"; cin>>s; } void displaystring() { cout <<"the string is:"<<s<<endl; } string operator +=(string &t); }; … | |
How would I make or find a spellcheck for wordpad and I don't mean like all spellchecker I mean like a built in spellcheck like in word were you just press F7 and bam no haveing a whole other program up so how would I even start to make that? |
The End.