Click here to Skip to main content
15,794,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Using "this" pointer to "copy" pointer Pin
Richard MacCutchan19-Sep-15 22:10
mveRichard MacCutchan19-Sep-15 22:10 
GeneralRe: Using "this" pointer to "copy" pointer Pin
Vaclav_20-Sep-15 4:02
Vaclav_20-Sep-15 4:02 
GeneralRe: Using "this" pointer to "copy" pointer Pin
Richard MacCutchan20-Sep-15 7:42
mveRichard MacCutchan20-Sep-15 7:42 
AnswerRe: [SOLVED?] Using "this" pointer to "copy" pointer Pin
Richard MacCutchan20-Sep-15 7:52
mveRichard MacCutchan20-Sep-15 7:52 
QuestionHow to break an infinite loop Pin
Mohamed Nehad18-Sep-15 17:57
Mohamed Nehad18-Sep-15 17:57 
AnswerRe: How to break an infinite loop Pin
Richard MacCutchan18-Sep-15 22:43
mveRichard MacCutchan18-Sep-15 22:43 
AnswerRe: How to break an infinite loop Pin
Fuseteam19-Sep-15 9:36
Fuseteam19-Sep-15 9:36 
QuestionDefine 'Enter' key in C Pin
Mohamed Nehad18-Sep-15 17:52
Mohamed Nehad18-Sep-15 17:52 
How can i define the enter key to stop a working loop in my program ?

for advance ..

2-programs here which enter key defined both with different ways !

==============

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

int main()
{

	int x=1;
	r:
	    printf("Allah  %d\n", x);
	    x++;
	    while ( getch() != '\r')
        {
            goto r;
        }
        return 0;

}


and the other one ..

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

int main()
{
	int  nm = 0, ch = 0, wr = 1,i=0;
	char x;

	while ((x=getchar()) != '\n')
	{
		if (isdigit(x))
		{
			nm++;
		}
		else if (isalpha(x))
		{
			ch++;
		}
		else if (x == ' ')
		{
			wr++;
		}
		i++;
	}
	printf(" \n");

	printf("Numbers entered = %d , Characters entered = %d , Words entered = %d", nm, ch, wr);
	printf(" \n");
	system("pause");
	return 0;
	
}


The first one enter was defined as '\r' while the second was '\n' ! which is the right way ?!
QuestionRe: Define 'Enter' key in C Pin
Richard MacCutchan18-Sep-15 22:44
mveRichard MacCutchan18-Sep-15 22:44 
AnswerRe: Define 'Enter' key in C Pin
Mohamed Nehad20-Sep-15 13:04
Mohamed Nehad20-Sep-15 13:04 
QuestionCall to std::thread::join() in the destructor of a global variable Pin
dchabaud17-Sep-15 4:49
dchabaud17-Sep-15 4:49 
AnswerRe: Call to std::thread::join() in the destructor of a global variable Pin
CPallini17-Sep-15 6:13
mveCPallini17-Sep-15 6:13 
GeneralRe: Call to std::thread::join() in the destructor of a global variable Pin
dchabaud17-Sep-15 6:27
dchabaud17-Sep-15 6:27 
QuestionRe: Call to std::thread::join() in the destructor of a global variable Pin
CPallini17-Sep-15 6:32
mveCPallini17-Sep-15 6:32 
AnswerRe: Call to std::thread::join() in the destructor of a global variable Pin
dchabaud17-Sep-15 21:57
dchabaud17-Sep-15 21:57 
GeneralRe: Call to std::thread::join() in the destructor of a global variable Pin
CPallini17-Sep-15 23:05
mveCPallini17-Sep-15 23:05 
Questionaccess violation with std::map (VS2015) Pin
Member 853403517-Sep-15 4:41
Member 853403517-Sep-15 4:41 
QuestionRe: access violation with std::map (VS2015) Pin
David Crow17-Sep-15 6:06
David Crow17-Sep-15 6:06 
QuestionRe: access violation with std::map (VS2015) Pin
CPallini17-Sep-15 6:09
mveCPallini17-Sep-15 6:09 
QuestionPassing parameters to constructor - very obvious and basic question from an OF Pin
Vaclav_16-Sep-15 12:31
Vaclav_16-Sep-15 12:31 
QuestionRe: Passing parameters to constructor - very obvious and basic question from an OF Pin
CPallini16-Sep-15 22:09
mveCPallini16-Sep-15 22:09 
AnswerRe: Passing parameters to constructor - very obvious and basic question from an OF Pin
Richard MacCutchan16-Sep-15 22:31
mveRichard MacCutchan16-Sep-15 22:31 
GeneralRe: Passing parameters to constructor - very obvious and basic question from an OF Pin
Vaclav_19-Sep-15 2:29
Vaclav_19-Sep-15 2:29 
AnswerRe: Passing parameters to constructor - very obvious and basic question from an OF Pin
Daniel Pfeffer19-Sep-15 22:30
professionalDaniel Pfeffer19-Sep-15 22:30 
QuestionReal time drawing using multithreading Pin
FrankStar8913-Sep-15 0:57
FrankStar8913-Sep-15 0:57 

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.