15,869,857 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Theo Buys (Top 7 by date)
Theo Buys
7-Aug-19 5:37am
View
Tanks for your solution. There are still some minor bugs in your example code: change TCHAR lpszParse into const TCHAR* lpszParse and change m_bHelp into m_bHelpParam. Also CMyCommandLineInfo don't match with CMyCmdLineInfo.
Theo Buys
5-Apr-17 11:20am
View
Time is on my side. Why nobody has aswerwerd this nice question?
Theo Buys
2-Dec-16 4:02am
View
Thanks!
Theo Buys
2-Dec-16 1:28am
View
yes, right! I must say:
3) The size of an object of a class depends on the class variables and not the size of the memberfunctions code.
Theo Buys
1-Dec-16 11:10am
View
Now forget all about allocating objects in the member functions. Lets look only at the class variables and the supporting member functions.
1) If allocate the object of the class on the heap, then the class and its variables are on the heap but if I run a memberfunction it uses the stack for its local variables and only the heap for the class variables.
2) If create the object of the class on the stack, then the class and its variables are on the stack and if I run a memberfunction it uses the stack for both its local variables and the class variables.
3) The size of a class depends on the class variables and not the size of the memberfunctions code.
Theo Buys
23-Nov-16 11:52am
View
So, the pointer heapVar is on the stack while the memory for the int[20] is on the heap. The pointer goes out of scope but the memory remains. I think that this proofs that memberfunctions of a heap allocated object are not part of that allocation but only the data and not the local data used in the member functions. The use of heapvar in the example is a kind of wild west and not part of the class data. This way the object creates memory leaks.
Theo Buys
25-Nov-13 9:12am
View
Yes, a tree structure is here the best solution. Because you program in plain C, read about "Self-referential structures" in the C programming language by Kernighan and Ritchie. Put you words one by one into the tree. Your search function walks the tree to a node and complete the words from that node to the leaves.
Show More