9,869,444 members (26,927 online)
Visit CodeProject.TV
Discuss CodeProject.TV
Sign in
Email
Password
Forgot your password?
Sign in using
home
articles
Chapters and Sections
>
Search
Latest Articles
Latest Tips/Tricks
Top Articles
Beginner Articles
Technical Blogs
Posting/Update Guidelines
Article Help Forum
Article Competition
Submit an article or tip
Post your Blog
quick answers
Ask a Question
View Unanswered Questions
View All Questions...
C# questions
ASP.NET questions
VB.NET questions
C#4.0 questions
C++ questions
discussions
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work & Training Issues
Design and Architecture
ASP.NET
JavaScript
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
Adobe Technologies
C#
Free Tools
Objective-C
Ruby On Rails
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
.NET Framework
Mobile
VS 11 & .NET 4.5
Sharepoint
Silverlight / WPF
Visual Basic
Web Development
Site Bugs / Suggestions
features
Component & Service Catalog
Competitions
News
The Insider Newsletter
Newsletter archive
Surveys
Product Showcase
Research Library
CodeProject Stuff
community
The Insider News
The Lounge
The Weird & The Wonderful
The Soapbox
Press Releases
Who's Who
Most Valuable Professionals
Company Listings
Non-English Language
>
General Indian Topics
General Chinese Topics
help
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
Site Map
Advertise with us
Employment Opportunities
About Us
The default search term operator is
AND
.
You can use brackets,
AND
,
OR
, and
NOT
to improve your search. For example:
C# AND NOT(VB or SQL)
A query of a single
*
will return everything, filtered by any filters.
Filter examples:
Search by Author
author:"author name"
Filter by tag
tag:C#
or
tag:(C++ or Java)
Wildcard search
use "?" or "*" eg.
gr?d
or
gr*
1,200 Results
Search
Everything
Articles
Technical Blogs
Tips & Tricks
Questions
Answers
Forum Messages
News Items
Catalog Items
Videos
Training Courses
Just My Stuff
My Bookmarks
Sort by
Relevance
Rating Asc
Rating Desc
Title Asc
Title Desc
Author Asc
Author Desc
Date Created Asc
Date Created Desc
Date Modified Asc
Date Modified Desc
Price Asc
Price Desc
Duration Asc
Duration Desc
Match
All Fields
Title
Description
Author(s)
Tags
Any Date
Last 12 hours
Last 24 hours
Last week
Last 2 weeks
Last month
Last 3 months
Last 6 months
Last year
January
February
March
April
May
June
July
August
September
October
November
December
Rating Range
All - Including Unrated
1.0 - 5.0
2.0 - 5.0
3.0 - 5.0
4.0 - 5.0
4.5 - 5.0
4.8 - 5.0
5.0
Advanced Filters:
Article Topics
All Topics
Desktop Development
Web Development
Mobile Development
Cloud Computing
Enterprise Systems
Database
Multimedia
Languages
Platforms, Frameworks & Libraries
General Programming
Graphics / Design
Development Lifecycle
General Reading
Third Party Products
Mentor Resources
Article License
All Licenses
CPOL
CDDL
Ms-PL
MPL
CPL
Eclipse
MIT
BSD
Apache
CC (ASA 2.5)
Zlib
Public Domain
CC (Attr 3U)
CC (ASA 3U)
LGPL3
GPL3
Forums
All Forums
Feature Forums
General Programming
Web Development
Product Lifecycle
Database & SysAdmin
General Discussions
Non-English Language
Catalog Category
All Categories
Books & Training
Charting & Graphing
Components, Controls, Libraries
Data Manipulation & Mining
Database Tools
Debugging
Documentation & Help
Financial, Math & Scientific
Frameworks & APIs
General Development Tools
GIS & Maps
Graphics & 3D Modeling
Hardware and Robotics
Hosting
IDEs
Imaging
Mobility
Multimedia
Networking
Performance and Profiling
Programming Languages
Project Life-cycle Management (ALM)
Reporting
Search
Security
Setup & Deploy
System Adminstration
Utilities
Virtualization
Web Design/Development
Catalog License
All Licenses
Commercial
Fully Function Evaluation version
Limited Functionality Trial
Limited Time Trial
Shareware
Free For Personal Use
Freeware
Page 1 of 24
Page Size:
10
·
25
·
50
Author filtered by: Stefan_Lang
[x]
Re: Extending the C using preprocessor and other goodies - how do they interact?
by
Stefan_Lang
Forum Message
5 May 2013
I did say "if you can help it", and the implied advice was that you should avoid #define, if there is a better method. There are better methods for every single example you gave: 1. #d
General Programming
»
C / C++ / Mfc
Re: Obscure C++ Features [from the newsletter]
by
Stefan_Lang
Forum Message
2 May 2013
I've tried my hand at redefining the comma operator[
General Discussions
»
The Lounge
Re: Access structure variable value using string representing variable's name in C++.
by
Stefan_Lang
Forum Message
1 May 2013
Please do not cross-post! It just makes it harder for everyone to gather the sparse information that is already
General Programming
»
C / C++ / Mfc
Re: Extending the C using preprocessor and other goodies - how do they interact?
by
Stefan_Lang
Forum Message
1 May 2013
Vaclav_Sal wrote:lack of understanding of one of the fundamental language features – in this case C preprocessor There isn't muc
General Programming
»
C / C++ / Mfc
C++11 lambda as default param for template's functor type
by
Stefan_Lang
Answer
1 May 2013
license:
CPOL
I know you can use functions as template parameters[^]. I suppose it could work with lambdas, but I have not tried myself.
General Programming
»
Uncategorised Quick Answers
»
General
C++
C++11
Lambda
Access structure variable value using string representing variable's name in C++.
by
Stefan_Lang
Answer
30 Apr 2013
license:
CPOL
I think you actually need something very different, but to give you an idea just how complex this task is, this something that would in part solve this problem:template class Property { std::string name_; T value_;public: Property(const std::string& name, const T&...
General Programming
»
Uncategorised Quick Answers
»
General
C++
Computer Languages and Interaction
by
Stefan_Lang
Answer
28 Apr 2013
license:
CPOL
The question you posted does not make a lot of sense in english. At least not if option 2 is the only accepted answer. In my comment above I suggested the term "memories" isn't accurate, but maybe it's something else, e. g. what exactly is meant by "interact"? This may refer to the ability to...
General Programming
»
Uncategorised Quick Answers
»
General
C++
Java
Why use the '*' marker?
by
Stefan_Lang
Answer
28 Apr 2013
license:
CPOL
The first is like a street sign pointing in one direction, and telling you Moscow is 7843 miles that way.The second is Moscow. ;-)P.S.: If you need any more help regarding C/C++ variable declarations, try this link:http://cdecl.ridiculousfish.com/?q=int%2A+a%3B[^]
General Programming
»
Uncategorised Quick Answers
»
General
C++
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
25 Apr 2013
P.P.S.: using svn copy on URLs implicitely commits the change whereas the version you used still required a commit. You did perform the move efore the commit, so there is a distinct difference between
General Discussions
»
The Weird And The Wonderful
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
25 Apr 2013
I give up. I'm used to the TSVN documentation which doesn't have a copy command: it only uses a branch command that only works on the repository. Problem solved... There still remain the facts that
General Discussions
»
The Weird And The Wonderful
Re: The cost of software
by
Stefan_Lang
Forum Message
25 Apr 2013
Actually the desktop market is heading the same direction: Portals like Steam and Origin sell new top titles as well as Indie games at a fraction of the standard price. Apparently enough people are bu
General Discussions
»
The Lounge
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
25 Apr 2013
I literally copied the commands you listed (except for the file paths). Also your question shouldn't be necessary: the two arguments were working copy locations*, a repository location must be an URL.
General Discussions
»
The Weird And The Wonderful
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
24 Apr 2013
For what its worth I found an old installation of the SVN command line client installed on my system (version 1.6.*something*) and tried to reproduce your results. I got to the cp command, and there I
General Discussions
»
The Weird And The Wonderful
Re: How to create 4 dimenstional array
by
Stefan_Lang
Forum Message
24 Apr 2013
If your only problem would be an array with one dynamic dimension, you could try this: std::vector<double> array[500][25][10]; That will create an array of 125000 double
General Programming
»
C / C++ / Mfc
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
24 Apr 2013
No, a branch in SVN is not a directory, it is a link! The problem is that everything was performed inside the working directory, i. e. there was only ever one version: copying a directory an
General Discussions
»
The Weird And The Wonderful
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
24 Apr 2013
Ok, let me put it that way: the repository root was the root of your working copy. Therefore any change under that root can not be part of a logical branch! A branch requires a complete copy of your w
General Discussions
»
The Weird And The Wonderful
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
24 Apr 2013
EdReel wrote:intuitive SCM like git That's an oxymoron if I've ever seen one :doh: Branches and merging used to be tricky and sometimes
General Discussions
»
The Weird And The Wonderful
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
24 Apr 2013
You never created a branch, you only created a copy of a subdirectory that happened to be named trunk/. That is why you then had two files rather than one. The problem started w
General Discussions
»
The Weird And The Wonderful
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
23 Apr 2013
Stuart Dootson wrote:when you branch in SVN, you're effectively copying the trunk (or whatever branch you're on) to a new location in the SVN repository (
General Discussions
»
The Weird And The Wonderful
Re: Yet another Subversion rant
by
Stefan_Lang
Forum Message
23 Apr 2013
Stuart Dootson wrote:a DVCS like mercurial or git has much better theoretical underpinnings than SVN. Branches are treated as alternate repositories
General Discussions
»
The Weird And The Wonderful
vector max_size calculation, how?
by
Stefan_Lang
Answer
22 Apr 2013
license:
CPOL
Now, if I am on a 32bit machine, with 2GB RAM, and if I have a vector of size say 170,000,000 members, what is the maximum size of each member do I have to have so I will not go out of memory?First, the physical amount of RAM has nothing to do with it: a modern OS will shuffle your memory...
General Programming
»
Uncategorised Quick Answers
»
General
C++
STL
game programing with c
by
Stefan_Lang
Answer
22 Apr 2013
license:
CPOL
There is an interesting tutorial for a simple physics engine[^] that includes moving, colliding balls. Check it out, it comes with great explanations and code.
General Programming
»
Uncategorised Quick Answers
»
General
C++
C
which loop is fastest and best in visual c++
by
Stefan_Lang
Answer
22 Apr 2013
license:
CPOL
Some things to consider:First, the speed of a loop usually depends on the code performed within much more than the type of loop.Second, which loop to use depends on the way you wish to control the loop. You can rewrite any type of loop as another, but that won't change your requirements...
General Programming
»
Uncategorised Quick Answers
»
General
VC6
C++
MFC
C++
Re: Hiding the folder from the explorer
by
Stefan_Lang
Forum Message
22 Apr 2013
At the very least, anyone with admin rights will always be able to see it. If nothing else, this is necessary for virus scanners and backup programs! Why is the standard hide flag not sufficient for y
General Programming
»
C / C++ / Mfc
Re: Is it a good practice to use continue
by
Stefan_Lang
Forum Message
18 Apr 2013
I have no doubt a good programmer can write good programs with any syntax element of any language, but that doesn't mean that everyone should! Even the best program deterioates over time. Of all eleme
General Programming
»
C / C++ / Mfc
Re: Is it a good practice to use continue
by
Stefan_Lang
Forum Message
18 Apr 2013
continue isn't on quite the same level of abusive potential as goto: goto can jump backwards, out of multiple nested levels of scope, and into an entire differen
General Programming
»
C / C++ / Mfc
Re: Windows 8 and the split personality Metro interface
by
Stefan_Lang
Forum Message
17 Apr 2013
Funny you're talking about Weakly interacting massive particles[
General Discussions
»
The Lounge
Re: Windows 8 and the split personality Metro interface
by
Stefan_Lang
Forum Message
17 Apr 2013
Tom Deketelaere wrote:Also took me a google search to find the damn shut down button I found it in my "Getting started with Win 8" booklet t
General Discussions
»
The Lounge
Re: Windows 8 and the split personality Metro interface
by
Stefan_Lang
Forum Message
17 Apr 2013
Regarding multiselect, I was refering to selecting multiple objects on the desktop or within Explorer using [Shift]-LMB or [CTRL]-LMB , or by dragging a frame around the objects. Somehow it never occu
General Discussions
»
The Lounge
Input and printing of 2D character arrays
by
Stefan_Lang
Answer
16 Apr 2013
license:
CPOL
While I'd urge you to heed the advice provided with solution 1 and check out a C++ tutorial[^], here's a few things to consider for this problem:There are various methods for reading input, but ultimately C++ is not a very comfortable language for parsing text from any source. You really...
General Programming
»
Uncategorised Quick Answers
»
General
C++
Re: Windows 8 and the split personality Metro interface
by
Stefan_Lang
Forum Message
15 Apr 2013
Then Microsofts thinking is wrong. They crippled the use of the mouse with metro: right-click opens a context toolbar at the bottom of the screen even if the cursor is at the top. closing an app, inst
General Discussions
»
The Lounge
Re: Math puzzle
by
Stefan_Lang
Forum Message
11 Apr 2013
The triangle center circle doesn't need to be 2m from the corner, it needs to be 2m from the outermost parts of the gap. These are the midpoints of the sides, which are only 2/sqrt(3)m removed from th
General Discussions
»
The Lounge
Re: Math puzzle
by
Stefan_Lang
Forum Message
11 Apr 2013
You assumed triangles with 4m sides, so the projected circles from the corners would just touch on the center of each side. You'd get exactly the same gaps as you would for the hexagons *with* the cen
General Discussions
»
The Lounge
Re: How much disk space do you need to work?
by
Stefan_Lang
Forum Message
11 Apr 2013
I did a very thorough investigation of the space we actively need some 30 months back, when all we had was a 80 GB HD and the option to outsource data to the company network. I've found our disks to b
General Discussions
»
The Lounge
Re: Math puzzle
by
Stefan_Lang
Forum Message
11 Apr 2013
In either variant you're going to have multiple projectors at the corners of each 'cell': in a square grid, if you want one projector on each corner and one in each center that results in an average o
General Discussions
»
The Lounge
Re: Math puzzle
by
Stefan_Lang
Forum Message
10 Apr 2013
An approximation would be easy enough to calculate (using r rather than the actual radius of the sphere to arrive at a formula): 1. Since the surface of the sphere is effectivey flat
General Discussions
»
The Lounge
Constructor Error. !! (What Is That.?)
by
Stefan_Lang
Answer
10 Apr 2013
license:
CPOL
There are several problems at hand:First, I've read your question (version 3) and the already existing solutions and comments. But then I ended up being totally confused, because part of the discussion didn't appear to make sense. The problem of course was that you drastically altered the...
General Programming
»
Uncategorised Quick Answers
»
General
C++
How can I make a same class name with another?
by
Stefan_Lang
Answer
9 Apr 2013
license:
CPOL
There are basically two ways to provide your own interface for a third party class.1. Inheritance:This wouldn't work, as you need to include the header file in your own header file, and you wish to avoid this.2. Using delegates:Your own class creates an instance of the library class...
General Programming
»
Uncategorised Quick Answers
»
General
C++
Re: Intellisense
by
Stefan_Lang
Forum Message
25 Mar 2013
Why do you bother? When I started at my current occupation it took me half an hour to get my boss purchase VisualAssist: 10 minutes to download and install the demo, 10 minutes to figure out what to p
General Discussions
»
The Lounge
Re: Intellisense
by
Stefan_Lang
Forum Message
25 Mar 2013
Intellisense causes problems for me about once every five years. That is roughly our schedule for VS updates, and the problem mentioned is to find out where the **** MS hid the deactivate option th
General Discussions
»
The Lounge
Is it possible to inline an overloaded operator?
by
Stefan_Lang
Answer
22 Mar 2013
license:
CPOL
Right, I finally found the problem in my original source code. There were actually two issues:1. I needed to move the definition of operator+ to a header (created a separate one for all the operator definitions to come). Thanks to Matthew Faithfull for pointing this out.2. The original...
General Programming
»
Uncategorised Quick Answers
»
General
C++
Visual-Studio
VS2010
When we make a pointer from a class or structure , what is that mean?
by
Stefan_Lang
Answer
21 Mar 2013
license:
CPOL
None of this is legal C or C++ syntax.First of all, you're not even using the correct keywords. Keywords and symbols in C/C++ are case sensitive.Second, your syntax is off: you didn't put the keywords and symbols in correct order for your statements to make sense.Third, declarations...
General Programming
»
Uncategorised Quick Answers
»
General
C++
Class
structures
Pointer
Maniputing time with C++
by
Stefan_Lang
Answer
21 Mar 2013
license:
CPOL
1. Convert the string to hours, minutes and seconds2. combine these three numbers to calculate the total number of seconds3. Add 804. Split up the resulting value back to hours, minutes and seconds5. convert that back to string.There may be shortcuts or faster ways of doing this, but...
General Programming
»
Uncategorised Quick Answers
»
General
C++
C
Linux
time
Is it possible to inline an overloaded operator?
by
Stefan_Lang
Question
21 Mar 2013
license:
CPOL
I've profiled my application to see why my 3D-vector implementation is almost 3 times slower than the corresponding C function calls: the results proved that every single function call costs more time than the actual arithmetic being performed! I've already cut the number of function calls down...
General Programming
»
Uncategorised Quick Answers
»
General
C++
Visual-Studio
VS2010
Re: Coffee and Programming?
by
Stefan_Lang
Forum Message
18 Mar 2013
Nader Elshehabi wrote:Coffee is as important to me as water Makes sense, unless you prefer chewing beans ;P
General Discussions
»
The Lounge
Re: Coffee and Programming?
by
Stefan_Lang
Forum Message
18 Mar 2013
Why do you think you have to pause a project just for the purpose of brewing or picking up a drink? I find that time to be highly productive - some of my best ideas I got while I was away from my desk
General Discussions
»
The Lounge
Re: Hungarian UIs
by
Stefan_Lang
Forum Message
18 Mar 2013
The name of a variable should indicate what it's used for, so I see no reason not to use Hungarian notation as a means to distinguish between different kinds of UI components. Since there is only a li
General Discussions
»
The Lounge
Using overloaded comma operator for initializing arrays
by
Stefan_Lang
Question
14 Mar 2013
license:
CPOL
I'm currently looking for ideas to improve our vector library. In Boost::uBlas I stumbled on a reference to Blitz++, which provdies a very neat looking method for initializing small sized vectors (and matrices): Array A(3,3); //two-dimensional 3-by-3 array of floatA = 1, 2, 3, ...
General Programming
»
Uncategorised Quick Answers
»
General
C++
Re: [Challenge/Puzzle] Implement reinterpret_cast
by
Stefan_Lang
Forum Message
13 Mar 2013
Originally my idea was to use a struct of function pointers and 'iterate' over them to arrive at a different pointer. However, I found that pointer arithmetic apparently doesn't work on function point
General Programming
»
C / C++ / Mfc
Re: [Challenge/Puzzle] Implement reinterpret_cast
by
Stefan_Lang
Forum Message
12 Mar 2013
The following code compiles and it does return the correct values: int* f1(int i) { return 0; } int* f2(int* pi) { return pi; } union UPointers { int*(*ag1[2])(int i); struc
General Programming
»
C / C++ / Mfc
Page 1 of 24
1
2
3
4
5
6
7
8
9
10
First
·
Prev
·
Next
·
Last
Advertise
|
Privacy
|
Mobile
Web04 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright ©
CodeProject
, 1999-2013
All Rights Reserved.
Terms of Use
Layout:
fixed
|
fluid