954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

student information portal

please help me to create a student information portal using stucture and union program in c.it should contain five sudents.
*for inputs we should use struct and for output we should use union and it also should have a controls...previous page, next page and escape for exit. i don't know the ascii codes for the three controls..
PLS HELP ME...

makibao
Newbie Poster
11 posts since Mar 2011
Reputation Points: 7
Solved Threads: 0
 

I have no idea what a "student information portal" is, but from your description I would start out by coding the structure and unions. The instructions you were given most likely tell you what they should contain.

As for next and previous page, write yourself a little console program that displays the decimal values for those keys. Your program will have to use non-standard C functions and call getch() from conio.h twice because it returns 0 or 224 the first time for special keys and the second call will give you the actual code. These codes are the same as normal keys, so you will have to device some way to tell the difference between normal keys and special keys. One way I've seen that is to add 126 to the special key value, and another way is to make the special key value a negative value.

If you don't want to use non-standard C functions in conio.h then another alternative is to use ncurses library.

#include <stdio.h>
#include <conio.h>
// Main Program 
int main()
{
    while(1)
    {
        int c = _getch();
        if( c == 0 || c == 224)
            c = _getch();
        printf("%d\n", c);
    }
}
Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: