Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

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 4:27
professionalMichael Haephrati28-Aug-18 4:27 
QuestionUsing Alternate Memory Heaps Pin
Richard Andrew x6419-Aug-18 10:04
professionalRichard Andrew x6419-Aug-18 10:04 
AnswerRe: Using Alternate Memory Heaps Pin
Richard MacCutchan19-Aug-18 21:24
mveRichard MacCutchan19-Aug-18 21:24 
AnswerRe: Using Alternate Memory Heaps Pin
Daniel Pfeffer21-Aug-18 5:46
professionalDaniel Pfeffer21-Aug-18 5:46 
GeneralRe: Using Alternate Memory Heaps Pin
Richard Andrew x6421-Aug-18 12:08
professionalRichard Andrew x6421-Aug-18 12:08 
GeneralRe: Using Alternate Memory Heaps Pin
Daniel Pfeffer21-Aug-18 20:21
professionalDaniel Pfeffer21-Aug-18 20:21 
GeneralRe: Using Alternate Memory Heaps Pin
Richard Andrew x6422-Aug-18 0:39
professionalRichard Andrew x6422-Aug-18 0:39 
QuestionIterating over an indefinitely large number of concentric loops Pin
Anthony Appleyard16-Aug-18 1:54
Anthony Appleyard16-Aug-18 1: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 MacCutchan16-Aug-18 23:17
mveRichard MacCutchan16-Aug-18 23:17 
QuestionHow to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Anthony Appleyard15-Aug-18 1:18
Anthony Appleyard15-Aug-18 1:18 
AnswerRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Randor 15-Aug-18 2:05
professional Randor 15-Aug-18 2:05 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Anthony Appleyard15-Aug-18 2:49
Anthony Appleyard15-Aug-18 2:49 
SuggestionRe: 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
Richard MacCutchan15-Aug-18 5:18
mveRichard MacCutchan15-Aug-18 5:18 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Anthony Appleyard15-Aug-18 5:54
Anthony Appleyard15-Aug-18 5:54 
JokeRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Randor 15-Aug-18 6:21
professional Randor 15-Aug-18 6:21 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Richard MacCutchan15-Aug-18 6:41
mveRichard MacCutchan15-Aug-18 6:41 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Richard MacCutchan15-Aug-18 6:40
mveRichard MacCutchan15-Aug-18 6:40 
QuestionC++ Vector object question Pin
focusdoit14-Aug-18 15:12
focusdoit14-Aug-18 15:12 
AnswerRe: C++ Vector object question Pin
Richard MacCutchan14-Aug-18 20:41
mveRichard MacCutchan14-Aug-18 20:41 
AnswerRe: C++ Vector object question Pin
markkuk14-Aug-18 23:51
markkuk14-Aug-18 23:51 
GeneralRe: C++ Vector object question Pin
samzcs15-Aug-18 2:28
samzcs15-Aug-18 2:28 
GeneralRe: C++ Vector object question Pin
Richard MacCutchan15-Aug-18 2:38
mveRichard MacCutchan15-Aug-18 2:38 
GeneralRe: C++ Vector object question Pin
samzcs15-Aug-18 2:55
samzcs15-Aug-18 2:55 
GeneralRe: C++ Vector object question Pin
Richard MacCutchan15-Aug-18 4:29
mveRichard MacCutchan15-Aug-18 4: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.