Click here to Skip to main content
15,884,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Error in returning array of int as reference Pin
Korowai23-Oct-16 2:39
Korowai23-Oct-16 2:39 
GeneralRe: Error in returning array of int as reference Pin
leon de boer23-Oct-16 4:24
leon de boer23-Oct-16 4:24 
GeneralRe: Error in returning array of int as reference Pin
Korowai23-Oct-16 8:11
Korowai23-Oct-16 8:11 
GeneralRe: Error in returning array of int as reference Pin
Korowai23-Oct-16 8:26
Korowai23-Oct-16 8:26 
QuestionRe: Error in returning array of int as reference Pin
David Crow23-Oct-16 15:26
David Crow23-Oct-16 15:26 
AnswerRe: Error in returning array of int as reference Pin
Joe Woodbury24-Oct-16 14:07
professionalJoe Woodbury24-Oct-16 14:07 
QuestionMost efficient way to create a string range in C? Pin
Member 1280348819-Oct-16 10:19
Member 1280348819-Oct-16 10:19 
AnswerRe: Most efficient way to create a string range in C? Pin
leon de boer19-Oct-16 19:33
leon de boer19-Oct-16 19:33 
There is no efficient way to do it you have to do a brute force roll of each character in each row.

It's a standard odometer setup roll a column, when that is complete move the next column 1.
Essentially it's just two functions roll character, roll next column a character.
The roll next column will on occasion call itself because rolling one column needs to roll the next and next etc (watch an odometer on a car roll)

As this is usually homework for a programming unit I will give you one of the functions, you need to do the other Smile | :)
void RollCharacter (char* MyStr, unsigned short Pos) {
	while (MyStr[Pos] <= 'z') {								
		printf("Permutation string = %s\r\n",  MyStr);	// Print the entry
		MyStr[Pos]++;									// Increment character
	}
}

//To test it
char TestStr[10] = { 0 };		   // Clear an array of character space
TestStr[0] = 'c';                  // Start start character . .. I choose "c"
RollCharacter(TestStr, 0);         // Roll that single character which is column zero

The column roll is fractionally harder but not much.
In vino veritas

AnswerRe: Most efficient way to create a string range in C? Pin
leon de boer20-Oct-16 21:14
leon de boer20-Oct-16 21:14 
AnswerRe: Most efficient way to create a string range in C? Pin
Joe Woodbury26-Oct-16 12:16
professionalJoe Woodbury26-Oct-16 12:16 
QuestionHow to invoke Printing Preferences for the given Printer programmatically? Pin
purnachandra505016-Oct-16 17:48
purnachandra505016-Oct-16 17:48 
SuggestionRe: How to invoke invoke Printing Preferences for the given Printer programmatically? Pin
Richard MacCutchan17-Oct-16 5:06
mveRichard MacCutchan17-Oct-16 5:06 
QuestionHelp please Memoized rod cutting in C while showing the length it is cut Pin
Member 1279667016-Oct-16 12:03
Member 1279667016-Oct-16 12:03 
AnswerRe: Help please Memoized rod cutting in C while showing the length it is cut Pin
leon de boer16-Oct-16 16:12
leon de boer16-Oct-16 16:12 
GeneralRe: Help please Memoized rod cutting in C while showing the length it is cut Pin
Richard MacCutchan17-Oct-16 5:08
mveRichard MacCutchan17-Oct-16 5:08 
AnswerRe: Help please Memoized rod cutting in C while showing the length it is cut Pin
Richard MacCutchan16-Oct-16 21:25
mveRichard MacCutchan16-Oct-16 21:25 
QuestionAssigning pointers from one class to another and Pin
Vaclav_14-Oct-16 6:23
Vaclav_14-Oct-16 6:23 
AnswerRe: Assigning pointers from one class to another and Pin
leon de boer14-Oct-16 17:58
leon de boer14-Oct-16 17:58 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_15-Oct-16 2:24
Vaclav_15-Oct-16 2:24 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer15-Oct-16 4:42
leon de boer15-Oct-16 4:42 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_15-Oct-16 6:12
Vaclav_15-Oct-16 6:12 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer15-Oct-16 17:16
leon de boer15-Oct-16 17:16 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_19-Oct-16 4:54
Vaclav_19-Oct-16 4:54 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer19-Oct-16 7:45
leon de boer19-Oct-16 7:45 
NewsHow to provide a Security to a proprietary software or presemtation. Pin
Member 1278313512-Oct-16 20:03
Member 1278313512-Oct-16 20:03 

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.