|
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 ?
|
|
|
|
|
It just growed like Topsy. We are testing out a complicated piece of hardware with many motors, lasers, an FPGA, etc, with many things happening at once which need to be reported.
I can break the dialog in half, of course. In fact, I'm starting to do that, but it would be nice not to have to move so much code. The present dialog box .cpp file is already about 5K lines.
bob c
|
|
|
|
|
bob coppock wrote:
The present dialog box .cpp file is already about 5K lines.
Ouch!
If *possible*, create child Dialog(s) and insert them into your
dialog. Of course, your child dialog won't have any title bar, ok or/and cancel button.
Good luck,
- Dirty hands lead to important discovery...
|
|
|
|
|
There's a limit on the # of controls you can have in a DIALOG section in your .rc file. Additional controls must be created at runtime.
--Mike--
"Everyone has figured out what 'service pack' really means, so they had to go and change the language. Perhaps this is what Bill was talking about in the 'security is top priority' letter."
-- Daniel Ferguson, 1/31/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Looks like you have a fundamental GUI design issue here.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
I was looking at the article by Robert Pittenger "Windows 2000 Style Wizards" and was trying to give it a try. The article is located at:
http://www.codeproject.com/dialog/wizard2000.asp
I wanted to bypass his initial dialog and force things to start with the Wizard right from the beginning. So, in the "Wiz.cpp" file, I just made the following modification:
CMasterDlg dlg; //used to be CWizDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
I also moved the code that was in the OnInitDialog of CWizDlg to the OnInitDialog of CMasterDlg.
however, I have a couple of problems.
One is that eventhough the pages do seem to be created, they do not show up and the second one, which probably stems from the first one and the fact that the pages are not somehow probably attached, is that I get errors when I try to cancel or click any of the keys.
Could you help me out on this one and tell me what I am doing wrong?
thanks
|
|
|
|