Click here to Skip to main content
15,893,486 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionabout Operator of >> and << in the Memory-Mapping Files. Pin
lxlenovostar30-May-10 0:41
lxlenovostar30-May-10 0:41 
AnswerRe: about Operator of >> and << in the Memory-Mapping Files. Pin
Richard MacCutchan30-May-10 1:32
mveRichard MacCutchan30-May-10 1:32 
GeneralRe: about Operator of >> and << in the Memory-Mapping Files. Pin
lxlenovostar30-May-10 16:14
lxlenovostar30-May-10 16:14 
Questionsimple char array Pin
hasani200729-May-10 6:58
hasani200729-May-10 6:58 
AnswerRe: simple char array Pin
Luc Pattyn29-May-10 7:05
sitebuilderLuc Pattyn29-May-10 7:05 
GeneralRe: simple char array Pin
hasani200729-May-10 7:25
hasani200729-May-10 7:25 
AnswerRe: simple char array Pin
Luc Pattyn29-May-10 7:55
sitebuilderLuc Pattyn29-May-10 7:55 
AnswerRe: simple char array Pin
Software_Developer29-May-10 8:11
Software_Developer29-May-10 8:11 
Im only guessing but..
Look at comments in the code.

Once you press enter, it exits the nested for loop and prints out what you put in.


#include <stdio.h>
#include <conio.h>





int main()
{

	int i,j;
	char list[80][20]={'\r' };
    printf("\n  input some chars ..\n\n ");
	for(j=0;j<1;j++)
	{
		for(i=0;i<50;i++)
		{
 

			list[i][j]=getchar();    //input  , press enter to exit getch's internal loop
			printf("%c = %d ",list[i][j],(int)(list[i][j]) );

			if ( (int) (list[i][j]==10) ) 
			{
                printf("\n  User pressed Enter: new line .. ");
			  break;   // char code for \n  is 10  
			}
			//if ( (int) (list[i][j]==10) ) continue;
		}
	}

        printf("\n\nListing..\n");
		for(j=0;j<5;j++)
		{
			for(i=0;i<50;i++)
			{
		     	printf("%c",list[i][j]);  //output
			}
			printf("\n");
		}
        printf("\n");
		return 0;
}

......
AnswerRe: simple char array Pin
Aescleal29-May-10 8:15
Aescleal29-May-10 8:15 
AnswerRe: simple char array Pin
CPallini29-May-10 9:22
mveCPallini29-May-10 9:22 
Questionarray with both string & float columns Pin
hasani200729-May-10 3:56
hasani200729-May-10 3:56 
AnswerRe: array with both string & float columns PinPopular
«_Superman_»29-May-10 5:01
professional«_Superman_»29-May-10 5:01 
QuestionCTreeCtrl Pin
Sakhalean29-May-10 3:21
Sakhalean29-May-10 3:21 
AnswerRe: CTreeCtrl Pin
Maximilien29-May-10 3:51
Maximilien29-May-10 3:51 
AnswerRe: CTreeCtrl Pin
ThatsAlok30-May-10 20:50
ThatsAlok30-May-10 20:50 
GeneralRe: CTreeCtrl Pin
Sakhalean30-May-10 21:12
Sakhalean30-May-10 21:12 
GeneralRe: CTreeCtrl Pin
ThatsAlok30-May-10 22:15
ThatsAlok30-May-10 22:15 
QuestionForground Window in WinXP and Win7 both Pin
rahul.kulshreshtha28-May-10 21:59
rahul.kulshreshtha28-May-10 21:59 
AnswerRe: Forground Window in WinXP and Win7 both Pin
rahul.kulshreshtha28-May-10 22:15
rahul.kulshreshtha28-May-10 22:15 
AnswerRe: Forground Window in WinXP and Win7 both Pin
gothic_coder28-May-10 23:15
gothic_coder28-May-10 23:15 
GeneralRe: Forground Window in WinXP and Win7 both Pin
rahul.kulshreshtha28-May-10 23:17
rahul.kulshreshtha28-May-10 23:17 
GeneralRe: Forground Window in WinXP and Win7 both Pin
gothic_coder28-May-10 23:22
gothic_coder28-May-10 23:22 
GeneralRe: Forground Window in WinXP and Win7 both Pin
rahul.kulshreshtha28-May-10 23:46
rahul.kulshreshtha28-May-10 23:46 
GeneralRe: Forground Window in WinXP and Win7 both Pin
gothic_coder29-May-10 0:04
gothic_coder29-May-10 0:04 
GeneralRe: Forground Window in WinXP and Win7 both Pin
rahul.kulshreshtha29-May-10 0:21
rahul.kulshreshtha29-May-10 0:21 

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.