|
The very first code block would be your .h file.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
My professor told me i would have to CREATE .h file. What would i put in .h file? Can you tell me what should i put in .h file from the code i posted?please.
|
|
|
|
|
#include <iostream>
#include <string>
using namespace std;
class CCustomer
{
private:
string Card_number;
public:
string first_name;
string last_name;
string customer_ID;
CCustomer();
CCustomer(string, string, string, string);
CCustomer(CCustomer& [Wink] ;
void input();
void output();
void display();
string getCard_number();
void setCard_number (string Card_Num);
};
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Don't forget the include guards:
#ifndef MYFILE_H
#define MYFILE_H
#endif
(or a #pragma once at the top of the file for MS compilers).
|
|
|
|
|
Cut the declarations from implementation file(.cpp file) and give those in the declaration file.
i.e ur header should contain the following:
class CCustomer
{
private:
string Card_number;
public:
string first_name;
string last_name;
string customer_ID;
CCustomer();
CCustomer(string, string, string, string);
CCustomer(CCustomer&;
void input();
void output();
void display();
string getCard_number();
void setCard_number (string Card_Num);
};
|
|
|
|
|
Hi write the following class and declared variable and functions in the ClassName.h file
class CCustomer
{
private:
string Card_number;
public:
string first_name;
string last_name;
string customer_ID;
CCustomer();//Default constructor
CCustomer(string, string, string, string);//Parameterized constructor
CCustomer(CCustomer& [Wink] ;//Copy constructor
void input();//Function to get inputs
void output();//Function to get outputs
void display();//To display the info of a customer
string getCard_number();//Accessor
void setCard_number (string Card_Num);//Mutator
};
and include the .h file in ClassName.CPP file as #include "ClassName.h"
and
write the main function in .cpp
it will work.
Dont forget to rate
|
|
|
|
|
Hi!
I've developed an application in C++. My program compile and links fine. When I run the application, the application window opens and closes in a sudden. It displays the following message in the output window:
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcr80.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcp80.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\glu32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgDB.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\xerces-c_2_8.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtCore.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\ode.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgGA.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgUtil.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgViewer.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgText.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgParticle.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtABC.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtDAL.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtAI.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\rcfgscript.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\rvrutils.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtAnim.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtGame.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgSim.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\cal3d.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\avgrsstx.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\nvoglnt.dll', No symbols loaded.
The thread 'Win32 Thread' (0xc28) has exited with code 0 (0x0).
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\mcd32.dll', No symbols loaded.
'CharacterAnimation.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtActors.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtAudio.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\alut.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\OpenAL32.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osgdb_ive.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgFX.dll', Binary was not built with debug information.
The program '[2268] CharacterAnimation.exe: Native' has exited with code 1 (0x1).
|
|
|
|
|
And what's the problem ? That's perfectly normal behavior to have those lines displayed.
T.RATHA KRISHNAN wrote: When I run the application, the application window opens and closes in a sudden
Did you try debugging to see what it's doing ?
|
|
|
|
|
I could not see what the application window displays(i.e. it opens and closes in a sudden). The output window displays,"The program '[3148] CharacterAnimation.exe: Native' has exited with code 1 (0x1)." What to do?
|
|
|
|
|
T.RATHA KRISHNAN wrote: What to do?
I already told you: use your debugger to see what the program is doing.
|
|
|
|
|
Usually, when an application closes without giving any error message, it's due to a stack overflow.
This may indicate infinite recursion.
You should single step the program in the debugger to find the cause.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Hi,
As he told the application is exit with code 1.
It means the application successfully run.
i have looked into your debug information which looks fine to me.
|
|
|
|
|
Doesn't success == 0 ?
1 means some error.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
No, you can return whatever code you like for your application (for a console app for example, you can return something from your main).
|
|
|
|
|
T.RATHA KRISHNAN wrote: When I run the application, the application window opens and closes in a sudden. It displays the following message in the output window
Is it not what is expected to do?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all,
This error comes when i enter long string in edit box and save in database.
I m using Access database and ODBC system dsn for connection.
Please help me for this.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
This most likely means that your string is too long for the database column.
Either make the database field larger, or make the data smaller.
In Access, I think the text fields are limited to 255 chars. To put in a longer string, you must use a memo field.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
The best option is divide your string.
and at last concatenate the strings while sending a parameter to an execute statement.
As a String will take at max 255 characters.If u try more than 255 characters it will neglect the characters more than 255 and end with NULL.
|
|
|
|
|
i have create connectiong with MS Access database
i know how to retrive/save text vlues from/to table feilds of MS DataBase
but i am unable to get date and convert its formate
for text geting text values from feilds i am using following code:
CDaoDatabase db;
CDaoRecordset recset(&db);
db.Open("patient.mdb");
Sql = "SELECT * FROM patient WHERE (LastName LIKE '"+temp+"*')";
recset.Open(AFX_DAO_USE_DEFAULT_TYPE,Sql,NULL);
while(!recset.IsEOF())
{
recset.GetFieldValue("lastname",var);
Client = (LPCSTR)var.pbstrVal;
b->AddString(Client);
recset.MoveNext();
}
|
|
|
|
|
If you try to retrieve the date you will get the value in string Format rather than DateTime format
So once you retrive the date .you have to Format the string.
can you send the table information
|
|
|
|
|
database name is "patient"
table name is "patient"
feilds are
firstname txt
lastname txt
date date
this table is in ms access 97
|
|
|
|
|
Please stop reposting same question again and again.
Regards,
Sandip.
|
|
|
|
|
hi:
i just need to creat a really simple application (thinking using VB2005 C++), that has a single up/down bar that control the master volume in windows. there are few question i met while searching the information throught the internet:
1. Some people told me that i need to "talk" to the windows first, and find out which services control the audio parts (Is it mmsystem.dll?) do this relate to window message loop?
2. i m thinking using VB2005 to create the GUI, when the bar goes up or down that create an event, and under that event is where i put my code in to set the volume. am i on the right logic?
sorry for being such noob in programming and ask stupid question, i m just a beginner.
thank you for the help
|
|
|
|
|
From your question it sounds like you don't have much experience with C++ or MFC.
Perhaps you should gain some more confidence before tackling this job.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|