Click here to Skip to main content
15,921,694 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to Set Position where a Window will be minimised Pin
SoftwareDeveloperGoa15-Jan-11 4:42
SoftwareDeveloperGoa15-Jan-11 4:42 
AnswerRe: How to Set Position where a Window will be minimised Pin
Emilio Garavaglia15-Jan-11 7:09
Emilio Garavaglia15-Jan-11 7:09 
GeneralRe: How to Set Position where a Window will be minimised Pin
SoftwareDeveloperGoa15-Jan-11 7:17
SoftwareDeveloperGoa15-Jan-11 7:17 
GeneralRe: How to Set Position where a Window will be minimised Pin
Emilio Garavaglia15-Jan-11 8:52
Emilio Garavaglia15-Jan-11 8:52 
GeneralRe: How to Set Position where a Window will be minimised Pin
SoftwareDeveloperGoa15-Jan-11 9:01
SoftwareDeveloperGoa15-Jan-11 9:01 
QuestionWhat wrong with this loop? Pin
Le@rner14-Jan-11 19:34
Le@rner14-Jan-11 19:34 
AnswerRe: What wrong with this loop? Pin
Andrew Brock14-Jan-11 21:10
Andrew Brock14-Jan-11 21:10 
AnswerRe: What wrong with this loop? Pin
jixuduxing14-Jan-11 22:37
jixuduxing14-Jan-11 22:37 
GeneralRe: What wrong with this loop? Pin
Andrew Brock14-Jan-11 23:39
Andrew Brock14-Jan-11 23:39 
AnswerRe: What wrong with this loop? Pin
cp987614-Jan-11 23:49
cp987614-Jan-11 23:49 
AnswerRe: What wrong with this loop? Pin
Richard MacCutchan15-Jan-11 0:02
mveRichard MacCutchan15-Jan-11 0:02 
AnswerRe: What wrong with this loop? Pin
CPallini15-Jan-11 2:39
mveCPallini15-Jan-11 2:39 
AnswerRe: What wrong with this loop? Pin
yu-jian15-Jan-11 3:43
yu-jian15-Jan-11 3:43 
Question(OpenGL/MFC/Win32) glReadPixels and CreateBitmap question... Pin
Maximilien14-Jan-11 7:57
Maximilien14-Jan-11 7:57 
AnswerRe: (OpenGL/MFC/Win32) glReadPixels and CreateBitmap question... Pin
User 742933814-Jan-11 10:03
professionalUser 742933814-Jan-11 10:03 
QuestionString Problem Pin
john563214-Jan-11 1:22
john563214-Jan-11 1:22 
AnswerRe: String Problem Pin
Stephen Hewitt14-Jan-11 1:34
Stephen Hewitt14-Jan-11 1:34 
AnswerRe: String Problem Pin
Maximilien14-Jan-11 1:59
Maximilien14-Jan-11 1:59 
Questioncreate dimmed icon with magick++ (ImageMagick) Pin
Thue Andersen13-Jan-11 22:10
Thue Andersen13-Jan-11 22:10 
AnswerRe: create dimmed icon with magick++ (ImageMagick) Pin
Chris Losinger14-Jan-11 3:04
professionalChris Losinger14-Jan-11 3:04 
AnswerRe: create dimmed icon with magick++ (ImageMagick) [modified] Pin
User 742933814-Jan-11 11:33
professionalUser 742933814-Jan-11 11:33 
GeneralRe: create dimmed icon with magick++ (ImageMagick) Pin
Thue Andersen16-Jan-11 5:00
Thue Andersen16-Jan-11 5:00 
GeneralRe: create dimmed icon with magick++ (ImageMagick) Pin
Rozis18-Jan-11 8:08
Rozis18-Jan-11 8:08 
GeneralRe: create dimmed icon with magick++ (ImageMagick) Pin
Thue Andersen18-Jan-11 22:13
Thue Andersen18-Jan-11 22:13 
QuestionIsalpha Function Issue. Pin
Mike Certini13-Jan-11 18:00
Mike Certini13-Jan-11 18:00 
In the below code, I am attempting to count the number of letters and number of words in a phrase. In researching the return values of isalpha(), I noted that when a letter is present the first character isalpha() output is 1. But the second character isalpha() output is 2? The phrase that was input into this example was the following: How do you organize? Can someone help me with why I am not getting uniform output for the "H" character and the "o" character?

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

int main(void)
	{
	int ch;
	float avg = 0;
	int spaces = 0;
	int letters = 0;
	int test = 0;
	int ltrcnt = 0;
	int spccnt = 0;		
	while((ch = getchar()) != '\n')
		{
		test = isalpha(ch);
		if(isalpha(ch) == 2)
			{
			ltrcnt++;
			}
		if(isspace(ch) == 8)
			{
			spccnt++;
			}
		}
	printf("The Number Of Words Are %d , The Number Of Letters Are %d ",(spccnt+1),ltrcnt);
	
	}

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.