Click here to Skip to main content
14,490,195 members

C / C++ / MFC

 
AnswerRe: Using "this" pointer to "copy" pointer Pin
Richard MacCutchan19-Sep-15 21:10
mveRichard MacCutchan19-Sep-15 21:10 
GeneralRe: Using "this" pointer to "copy" pointer Pin
Vaclav_20-Sep-15 3:02
MemberVaclav_20-Sep-15 3:02 
GeneralRe: Using "this" pointer to "copy" pointer Pin
Richard MacCutchan20-Sep-15 6:42
mveRichard MacCutchan20-Sep-15 6:42 
AnswerRe: [SOLVED?] Using "this" pointer to "copy" pointer Pin
Richard MacCutchan20-Sep-15 6:52
mveRichard MacCutchan20-Sep-15 6:52 
QuestionHow to break an infinite loop Pin
Mohamed Nehad18-Sep-15 16:57
MemberMohamed Nehad18-Sep-15 16:57 
AnswerRe: How to break an infinite loop Pin
Richard MacCutchan18-Sep-15 21:43
mveRichard MacCutchan18-Sep-15 21:43 
AnswerRe: How to break an infinite loop Pin
Fuseteam19-Sep-15 8:36
MemberFuseteam19-Sep-15 8:36 
QuestionDefine 'Enter' key in C Pin
Mohamed Nehad18-Sep-15 16:52
MemberMohamed Nehad18-Sep-15 16: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 21:44
mveRichard MacCutchan18-Sep-15 21:44 
AnswerRe: Define 'Enter' key in C Pin
Mohamed Nehad20-Sep-15 12:04
MemberMohamed Nehad20-Sep-15 12:04 
QuestionCall to std::thread::join() in the destructor of a global variable Pin
dchabaud17-Sep-15 3:49
Memberdchabaud17-Sep-15 3:49 
AnswerRe: Call to std::thread::join() in the destructor of a global variable Pin
CPallini17-Sep-15 5:13
mveCPallini17-Sep-15 5:13 
GeneralRe: Call to std::thread::join() in the destructor of a global variable Pin
dchabaud17-Sep-15 5:27
Memberdchabaud17-Sep-15 5:27 
QuestionRe: Call to std::thread::join() in the destructor of a global variable Pin
CPallini17-Sep-15 5:32
mveCPallini17-Sep-15 5:32 
AnswerRe: Call to std::thread::join() in the destructor of a global variable Pin
dchabaud17-Sep-15 20:57
Memberdchabaud17-Sep-15 20:57 
GeneralRe: Call to std::thread::join() in the destructor of a global variable Pin
CPallini17-Sep-15 22:05
mveCPallini17-Sep-15 22:05 
Questionaccess violation with std::map (VS2015) Pin
Member 853403517-Sep-15 3:41
MemberMember 853403517-Sep-15 3:41 
QuestionRe: access violation with std::map (VS2015) Pin
David Crow17-Sep-15 5:06
MemberDavid Crow17-Sep-15 5:06 
QuestionRe: access violation with std::map (VS2015) Pin
CPallini17-Sep-15 5:09
mveCPallini17-Sep-15 5:09 
QuestionPassing parameters to constructor - very obvious and basic question from an OF Pin
Vaclav_16-Sep-15 11:31
MemberVaclav_16-Sep-15 11:31 
QuestionRe: Passing parameters to constructor - very obvious and basic question from an OF Pin
CPallini16-Sep-15 21:09
mveCPallini16-Sep-15 21:09 
AnswerRe: Passing parameters to constructor - very obvious and basic question from an OF Pin
Richard MacCutchan16-Sep-15 21:31
mveRichard MacCutchan16-Sep-15 21:31 
GeneralRe: Passing parameters to constructor - very obvious and basic question from an OF Pin
Vaclav_19-Sep-15 1:29
MemberVaclav_19-Sep-15 1:29 
AnswerRe: Passing parameters to constructor - very obvious and basic question from an OF Pin
Daniel Pfeffer19-Sep-15 21:30
professionalDaniel Pfeffer19-Sep-15 21:30 
QuestionReal time drawing using multithreading Pin
FrankStar8912-Sep-15 23:57
MemberFrankStar8912-Sep-15 23: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.