Click here to Skip to main content
13,765,990 members

C / C++ / MFC

 
AnswerRe: How I can make the GUI like as photoshop (dark theme) by using Visual Studio C++ ? Pin
Michael Haephrati28-Aug-18 5:27
mvpMichael Haephrati28-Aug-18 5:27 
QuestionUsing Alternate Memory Heaps Pin
Richard Andrew x6419-Aug-18 11:04
professionalRichard Andrew x6419-Aug-18 11:04 
AnswerRe: Using Alternate Memory Heaps Pin
Richard MacCutchan19-Aug-18 22:24
protectorRichard MacCutchan19-Aug-18 22:24 
AnswerRe: Using Alternate Memory Heaps Pin
Daniel Pfeffer21-Aug-18 6:46
professionalDaniel Pfeffer21-Aug-18 6:46 
GeneralRe: Using Alternate Memory Heaps Pin
Richard Andrew x6421-Aug-18 13:08
professionalRichard Andrew x6421-Aug-18 13:08 
GeneralRe: Using Alternate Memory Heaps Pin
Daniel Pfeffer21-Aug-18 21:21
professionalDaniel Pfeffer21-Aug-18 21:21 
GeneralRe: Using Alternate Memory Heaps Pin
Richard Andrew x6422-Aug-18 1:39
professionalRichard Andrew x6422-Aug-18 1:39 
QuestionIterating over an indefinitely large number of concentric loops Pin
Anthony Appleyard16-Aug-18 2:54
memberAnthony Appleyard16-Aug-18 2:54 
Before I retired, I had to write, or service, programs that simulated behavior of polymer molecules. Each link in the polymer molecule chain could assume up to 3 possible rotation values. Later I wrote this program to do that sort of job:-

#define N 4
int main()
	{int i, j, ncases, x[N], start[N], stop[N], n = N; ncases = 0;
	for (i = 0; i<n; i++) { start[i] = x[i] = 0; stop[i] = 3; } // set up
	for (x[(i = n) - 1]--; i > 0; x[i] = start[i]) for (i--; (++x[i]) <= stop[i]; i = n - 1) { // iterate over all cases
		ncases++;
		for (j = 0; j < n; j++) putchar('0' + x[j]); // replace by something useful to be done over every allowed combination of values of x[0:N-1]
		putchar(' '); }
	printf("\n%d cases found\n~~~~~~~~~~~~~~\n", ncases);
	printf("press a key to continue:"); i = getchar();
	return 0;
}

This seems to do the same as:-
for( i[N-1] = start[N-1]; i[N-1] <= stop[N-1]; i[N-1]++ )
    for( i[N-2] = start[N-2]; i[N-2] <= stop[N-2]; i[N-2]++ )
        for( i[N-3] = start[N-3]; i[N-3] <= stop[N-3]; i[N-3]++ )
            for( i[N-4] = ...............................
                         etc to ..
                               for( i[1] = start[1]; i[1] <= stop[1]; i[1]++ )
                                   for( i[0] = start[0]; i[0] <= stop[0]; i[0]++ )
                                        { work to be done for every allowed combination of values of i[0:N-1] }

In case this piece of program text is any use to you.

modified 16-Aug-18 8:15am.

AnswerRe: Iterating over an indefinitely large number of concentric loops Pin
Richard MacCutchan17-Aug-18 0:17
protectorRichard MacCutchan17-Aug-18 0:17 
QuestionHow to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Anthony Appleyard15-Aug-18 2:18
memberAnthony Appleyard15-Aug-18 2:18 
AnswerRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Randor 15-Aug-18 3:05
professional Randor 15-Aug-18 3:05 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Anthony Appleyard15-Aug-18 3:49
memberAnthony Appleyard15-Aug-18 3:49 
SuggestionRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Randor 15-Aug-18 4:05
professional Randor 15-Aug-18 4:05 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Richard MacCutchan15-Aug-18 6:18
protectorRichard MacCutchan15-Aug-18 6:18 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Anthony Appleyard15-Aug-18 6:54
memberAnthony Appleyard15-Aug-18 6:54 
JokeRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Randor 15-Aug-18 7:21
professional Randor 15-Aug-18 7:21 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Richard MacCutchan15-Aug-18 7:41
protectorRichard MacCutchan15-Aug-18 7:41 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Richard MacCutchan15-Aug-18 7:40
protectorRichard MacCutchan15-Aug-18 7:40 
QuestionC++ Vector object question Pin
focusdoit14-Aug-18 16:12
memberfocusdoit14-Aug-18 16:12 
AnswerRe: C++ Vector object question Pin
Richard MacCutchan14-Aug-18 21:41
protectorRichard MacCutchan14-Aug-18 21:41 
AnswerRe: C++ Vector object question Pin
markkuk15-Aug-18 0:51
membermarkkuk15-Aug-18 0:51 
GeneralRe: C++ Vector object question Pin
samzcs15-Aug-18 3:28
membersamzcs15-Aug-18 3:28 
GeneralRe: C++ Vector object question Pin
Richard MacCutchan15-Aug-18 3:38
protectorRichard MacCutchan15-Aug-18 3:38 
GeneralRe: C++ Vector object question Pin
samzcs15-Aug-18 3:55
membersamzcs15-Aug-18 3:55 
GeneralRe: C++ Vector object question Pin
Richard MacCutchan15-Aug-18 5:29
protectorRichard MacCutchan15-Aug-18 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.181114.1 | Last Updated 15 Nov 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid