![]() |
|
#1
|
|||
|
|||
Can someone look through my code?I am in the process of making a program in Microsoft Visual Studio 2003 for a college project. The program is very basic and it is about 50% completed.
Basically you enter your details in the text boxes towards the right, and then click the enter button. A seat towards the right (one of the 10 labels) will display your first and second name. Double clicking a booked seat will display details in the text boxes at the bottom of the window. That is all I want so far and I have written the code but I am getting errors. I am new to programming and I made this program by copying a similar program (teacher said this is fine) and changing the code as well as adding extra things. Could someone have a look at my program and fix the errors for me please? Ignore the design, I know everything is misaligned, I will fix that later, I just want the program working. I dont want code rewritten, I would like it exactly how it is because this is the only way I understand. I have uploaded my program http://homepage.ntlworld.com/stephanie.mirza/AlphaJet's%20Booking%20System.zip I dont understand the code well enough to make big changes, please can someone help? |
|
#2
|
|||
|
|||
Re: Can someone look through my code?When I try and run the program, I first of all get this....
http://homepage.ntlworld.com/stepha...ent%20Error.JPG and then I get 4 errors http://homepage.ntlworld.com/stepha...03%20error1.JPG |
|
#3
|
|||
|
|||
Re: Can someone look through my code?Quote:
Firstly pasting the errors you get when compiling helps us to help you. CPP / C++ / C Code:
What is happening on that line? seats is an array but you are trying to assign one element of the array PassengerType to the whole of seats I think. Firstly you could do PassengerType[11] or *PassengerType or even *PassengerType[11] but not PassengerType*[11] I think. Then you seem to have a syntactical error, you have missed the semi-colon from the end of the line. CPP / C++ / C Code:
The compiler says that you are missing the arguments for the function lblSeat1_Click or if you want to create a pointer to a member function use &AlphaJetsBookingSystem::FrmBookingSystem::lblSeat 1_Click instead of AlphaJetsBookingSystem::FrmBookingSystem::lblSeat1 _Click ---------------------------------------------- firstName is a string but you are treating it as if it was a member of System::Windows::Forms::Label I'm not sure if that helps you at all for now, if you try sorting those errors first you can post your updated code and we can try and go from there. Last edited by LuciWiz : 06-Jun-2006 at 08:24.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|
#4
|
|||
|
|||
Re: Can someone look through my code?Thanks Johnny, you have been a big help. I have gotten further in my program now, I will post back here if I get further problems. Thanks all
|
Recent GIDBlog
Meeting the populace by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Guidelines for posting requests for help - UPDATED! | WaltP | C Programming Language | 1 | 11-Nov-2007 21:05 |
| 25-35% off on all shared & reseller packages FOR LIFE! | my-e-space | Web Hosting Advertisements & Offers | 0 | 11-May-2006 21:00 |
| Here it is again! 35% - 40% off For Life! | my-e-space | Web Hosting Advertisements & Offers | 0 | 20-Apr-2006 14:48 |
| functions seems not to exit from a certain code block | jaro | C Programming Language | 3 | 21-Mar-2006 23:08 |
| Problem with int mixed with char,... | leitz | C++ Forum | 17 | 07-Dec-2004 20:56 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The