D
doublemaster007
Hi All
I want to read the keybord till user presses enter (Enter also shud be
there in the strptr). Below code works incase of user has pressed
chars upto 1024. Incase of more chars this code doesnt work in HP-UX
machine....it ignores first 1024 chars and rest of them will be there
in strptr.
Does this code depnds on architecture? Why this code doesnt work in HP-
UX???
strptr = (char *)malloc(4096)
tempsstr=strptr
//strptr shub be memset to 0
while((*strptr++ = getchar()) != '\n')
{
// This loop shud read the chars until enter is pressed
}
strptr = mpsstr
I want to read the keybord till user presses enter (Enter also shud be
there in the strptr). Below code works incase of user has pressed
chars upto 1024. Incase of more chars this code doesnt work in HP-UX
machine....it ignores first 1024 chars and rest of them will be there
in strptr.
Does this code depnds on architecture? Why this code doesnt work in HP-
UX???
strptr = (char *)malloc(4096)
tempsstr=strptr
//strptr shub be memset to 0
while((*strptr++ = getchar()) != '\n')
{
// This loop shud read the chars until enter is pressed
}
strptr = mpsstr