Forum: C++ Nov 4th, 2009 |
| Replies: 14 Views: 434 To avoid buffer overflow, prefer using cin.getline(char_ptr, size);
>> With that code, calling the >> operator will always store it into appt.subject, but what about storing information to... |
Forum: C++ Nov 4th, 2009 |
| Replies: 14 Views: 434 The problem is again sort of same. appt.subject = new char[strlen(ptr) + 1];. Neither ptr holds any string nor it point to any dynamically allocated memory and you are still trying to calculate its... |
Forum: C++ Nov 4th, 2009 |
| Replies: 14 Views: 434 Its happening because subject is not pointing to a valid address, basically you haven't allocated memory to it. Either use char subject[size] or allocate memory in constructor using malloc() or new... |
Forum: C++ Jan 3rd, 2008 |
| Replies: 4 Views: 764 What linker errors are you getting? You have just declared the function paidout() but not defined it. And perhaps you have called it somewhere else. Also if you think thats the whole program then its... |
Forum: C++ Jan 3rd, 2008 |
| Replies: 4 Views: 1,505 Yes windows.h, if you are using windows. And the function name is Sleep() not sleep() |
Forum: C++ Dec 11th, 2007 |
| Replies: 10 Views: 1,181 No, back() return reference. |
Forum: C++ Oct 13th, 2007 |
| Replies: 17 Views: 10,038 The program you are discussing is a Windows program which uses Win32 API library.
In resource.h you may get error if you havn't left a blank line at the end.
If you dont know what hInstance or... |
Forum: C++ Oct 11th, 2007 |
| Replies: 22 Views: 7,393 If getnumber() doen't ask for values but just shows them, it would look like this
int findbig(int a, int b)
{
// will return -1, if a is greater
// 0 if both are equal
// 1 if b... |
Forum: C++ Sep 12th, 2007 |
| Replies: 18 Views: 6,242 Whats the code, so that we could see whats happening. Here's an MSDN link (http://msdn2.microsoft.com/en-us/library/t8xe60cf%28VS.80%29.aspx) which show some common reason to this specific error. |
Forum: C++ Sep 12th, 2007 |
| Replies: 6 Views: 3,882 Of course all pragmas are compiler dependent and different compilers could have different pragmas. I didn't mentioned it all but I think its pretty clear. By deprecated I meant its somewhat strongly... |
Forum: C++ Sep 12th, 2007 |
| Replies: 6 Views: 3,882 You could also use #pragma once but it is compiler dependent and deprecated. Its generally used with MSVC++. |
Forum: C++ Sep 5th, 2007 |
| Replies: 7 Views: 1,522 Ok then same messages. Try this. Goto Project->Properties->Linker->System->Subsystem. Change it to /SUBSYSTEM:CONSOLE. |
Forum: C++ Sep 5th, 2007 |
| Replies: 7 Views: 1,522 What error messages are you are getting? The project as console application must compiler your program well.
Also try to deselect(if selected) the Precompiled Header option. Sometimes it happens... |
Forum: C++ Sep 3rd, 2007 |
| Replies: 6 Views: 2,369 There is separate MSDN Express Edition for VS2005 Express, which integrates itself to VS. |
Forum: C++ Apr 6th, 2007 |
| Replies: 3 Views: 2,031 Are you sure that you have wriiten
#include <iostream> not ioestream as the error shows. |
Forum: C++ Mar 31st, 2007 |
| Replies: 9 Views: 1,590 Aint giving you the code, but here;s how it has to ve dont. Suppose u define a 7x7 matrix in double dimention array. Initially fill them either with false meaning not filled. As the game continues... |
Forum: C++ Mar 19th, 2007 |
| Replies: 5 Views: 2,084 Yes that works.
Visual C++ 6.0 is quite old and quite buggy too. So get a new compiler, maybe that helps you:
These all are good and free:
Visual C++ 2005 Express Edition
CodeBlocks IDE
Turbo... |
Forum: C++ Mar 19th, 2007 |
| Replies: 5 Views: 2,084 Works perfect in my compiler Visual C++ 2005 Express, which compiler do you use. |
Forum: C++ Mar 1st, 2007 |
| Replies: 7 Views: 4,284 Hi, I am too a C++ student(in school) from India only.:)
Well it is this pointer. This operator is "*" which when precededby pointer name refers to its value, and when not it the the address stored... |
Forum: C++ Nov 30th, 2006 |
| Replies: 6 Views: 3,307 the syntax for switch case is :
switch(data type)
{
case value1: statements; break;
case value2: statements; break;
.............................................
... |