|
It had just occured to me this would be the case. I'm at a loss why they make you learn to do things in a way you never will again, but I guess that just seems to be the way it is done. I learned from a book and learned the whole char* way, and I remember being amazed how much easier it was when I used the string class.
By the way, you need to tick 'display this message as is' when you post code, otherwise your #include statements don't get posted, because the < and > get interpreted as a HTML tag.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
probably making you understand that string is better than char*, obviously, when they discover that there is a string class and something called STL. There are many, many instructors who do not know a thing about STL.
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Thomas George wrote:
There are many, many instructors who do not know a thing about STL.
I am not surprised to hear that. Pathetic, isn't it ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
well
i don't think he doesn't know about STL
but he just like to makes our life harder
he thinks that if you want to use libraries, then go program with JAVA
|
|
|
|
|
Marwan wrote:
he thinks that if you want to use libraries, then go program with JAVA
IMO he is a professional idiot if he means not to use libraries for production code. Where would any science be if we were not allowed to benefit from the work done before us ?
I COULD spend my life writing containers and algorithms, but why would I want to ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
As a software engineer, of course I agree with the whole code reuse thing. STL is a spectacular tool that I can't live without.
However, given the type of questions posted here by Marwan, it looks like he/she needs a good solid understanding of the basics of the language before introducing them to the relatively complex ideas of templates. Don't you think?
J
|
|
|
|
|
I understand that std::string is a typedef of a templated class, but would he need to know that ?
I dunno, I'm all for using char arrays early on, but at this point, he seems to have a lot of complexity introduced by virtue of not using a string class. I don't think 'ground up' is always the best way to learn, that's why I am against learning C before C++. You don't need to know about templates/namespaces/etc. to learn C++, you can just find out later that using namespace std; is bad code, and how templates work, etc. I believe C++ is an excellent learning language if you use the facilities it provides and then pull away the supports as you go on to learn the depth of what it can do.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
I've just got a new computer, and I'm using my old version of vc 6 with service pack 5 on windows xp. The problem is that it often pops up messages of this sort...
http:\\joelholdsworth.members.beeb.net\strange.jpg
It seems to popup when I'm altering certain files, or looking at some of the mfc sources. The only way I can get rid of it is to press the cancel button repeatedly for around 30 seconds. This is intensly irritating! Does anyone know the cure? or what its caused by, or has anyone seen this problem, because its eminantly not caused by "\Device\Harddisk1\DR1" not having a disk in it!
With time we live, with money we spend!
Joel Holdsworth
|
|
|
|
|
Well, it's not msdev. We have three people with XP and VC6 with SP5 and everythings ok. I'd check XP out, this sounds rather serious.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
Sounds more like a problem with XP or the hardware.
Do you get this error with any other software running on the PC ?
Whilst you say
Joel Holdsworth wrote:
because its eminantly not caused by "\Device\Harddisk1\DR1" not having a disk in it!
at that moment in time it maybe that the PC considers that it doesn't have a disk !!
We get a similar message on one of our servers which we believe is connected to the number of buffers allocated to passing data between the disks and the server, so your PC may be timing out in someway when writing to the disk. I would open it up and just check the cables as a starting point.
|
|
|
|
|
Is there a message or some sort of event that I could catch in my app if the machine is running low on virtual memory ?
Cheers
AndyC
|
|
|
|
|
It's a little complicated but you can use VirtualQuery();
Regards a Good Luck...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Compiling...
main.cpp
C:\Windows\Desktop\DataStru\main.cpp(91) : error C2601: 'setInitialValue' : local function definitions are illegal
C:\Windows\Desktop\DataStru\main.cpp(96) : error C2601: 'setcurStockPrice' : local function definitions are illegal
C:\Windows\Desktop\DataStru\main.cpp(101) : error C2601: 'setmanufCompany' : local function definitions are illegal
C:\Windows\Desktop\DataStru\main.cpp(106) : error C2601: 'setNumOfOutShares' : local function definitions are illegal
C:\Windows\Desktop\DataStru\main.cpp(111) : error C2601: 'setTypeOfManufactr' : local function definitions are illegal
thank you
|
|
|
|
|
Show me teh definition fo those functions...
Reagrds
Computer analyst to programmer: "You start coding. I'll go find out what they want."
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Post some code.
Jon Sagara
What about ?
|
|
|
|
|
Seems that you tried to define setInitialValue etc. inside of main(). Move them to the global space, and it should be OK
I vote pro drink
|
|
|
|
|
seems like you have done something similar to this:
void someFunction(...)
{
void setInitialValue(...)
{
...
}
...
} this is illegal C++. Move the setInitialValue (and all the offending functions) outside their enclosing functions.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
rumble rumble
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Your answer was better, but I was faster
I vote pro drink
|
|
|
|
|
Sorry but I was the First!!!!
Regards
Enter any 11-digit prime number to continue...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Big money says you forgot a closing brace }. Start at line 91 and work backwards looking for it.
J
|
|
|
|
|
Can any one tell me that From where I can find good help to use MS Flex Grid.
I already search MSDN and Microsoft sites but Could not find.
I want to use it from C++ (if Possibe).
Thanks in Advance.
|
|
|
|
|
You need to use the Inmagination....;P
If you have someting called VB, you can find a little help...
I'm sorry.
The best help is Ask to your Friends in CP...
Regards....
Computer analyst to programmer: "You start coding. I'll go find out what they want."
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
There seems to be a limit to the number of controls in a dialog box. It appears to be less than 255. At that point there is no warning, but the editor refuses to place another control on the window unless you first remove one.
I can't find any documentation about this limit, or whether there is a way to surpass it. Any ideas?
Thanks for your help
bob c
|
|
|
|
|
Just out of curiosity, what are you doing that requires 255+ controls in one dialog?
Jon Sagara
What about ?
|
|
|
|