How can I use vector for entering numbers?
Formatting

This is probably the worst formatted piece of code I have seen in a while. It does not matter to the compiler but you are writing in a high level language so that other humans can read it.


Indentation
White Space
one line per declaration
Use meaningful variable and function names (don't shorten them).


Examples:

void student::vrod(){
cout&lt;&lt;"name=";
cin&gt;&gt;name;
cout&lt;&lt;"stno=";
cin&gt;&gt;stno;
cout&lt;&lt;"score=";
cin&gt;&gt;score;
}

// this should be (more like)

void student::vrod()
{
    std::cout &lt;&lt; "name=";
    std::cin &gt;&gt; name;

    std::cout &lt;&lt; "stno=";
    std::cin &gt;&gt; stno;

    std::cout &lt;&lt; "score=";
    std::cin &gt;&gt; score;
}


Declarations. The types of objets are the most important thing in C++. So give each object a name and a type and use a single line for each.

    int stno,score,i,n;

    // That's just lazy;

    int stno;   // Why not studentNumber
    int score;
    int i;
    int n;


Stop Using "using"

using namespace std;


See: Why is “using namespace std” in C++ considered bad practice?

For anything longer than a 10 line program it becomes a curse and is likely to get you into trouble (in a way that is hard to find). So avoid doing it. Also avoid using it in your 10 line programs as that can be habit forming and will make you use it accidently).

Nameing conventions.

It is common convention for user defined types to have an initial capitol letter. This is to make types stand out from objects.

MyThing();  // This is a temporary object that is created.
myThink();  // This is a function call
            //
            // Notice the initial capitol letter allows you
            // to distinguish the two.


Also member variables should be nouns (the names of things, descriptive). While methods should be verbs (actions that are applied to your object). Using longer names will not make the code larger but it will make the code more readable.

class Student
{
    public:
        // Method names are actions that can be applied to
        // the object (avoid names like get/set it breaks encapsulation

        void getInfo(std::istream&amp; str = std::cin);
        void display(std::ostream&amp; str = std::cout);
    private:
        // Member variables should always be private.
        // Any modification of the state of the object
        // should be controlled by a method of the class
        // so that state can be updated consistently.

        // Use meaningful names.
        // Note: These are inside the student class.
        //       So name  =&gt; is a student name
        //          score =&gt; is a student score

        std::string   name;   // You seem to have forgotten this member.
        std::size_t   number;
        int           score;
        // These seem redundant so I am removing them.
        // int           i;
        // int           n;
};


Input and Output operator.

Your functions. vrod() and dis() work fine. But they only accept input/ouput from the standard streams. It would be nice if they could accept input/output from any stream (like a string or a file or a network socket).

You should pass the stream they are going to use as a parameter. You can default it to the stanadrd stream so that if it is not specified then it uses std::cin/std::cout.

class student{
public:
    void vrod(std::istream&amp; in = std::cin);
    void dis(std::ostream&amp; out = std::cout);
};


Then normal input and output is done via operator&lt;&lt; and operator&gt;&gt;. Writting these for your class becomes very simple.

std::ostream&amp; operator&lt;&lt;(std::ostream&amp; s, student const&amp; data)
{
    data.dis(s);
    return s;
}
std::istream&amp; operator&gt;&gt;(std::istream&amp; s, student&amp; data)
{
    data.vrod(s);
    return s;
}


Now you can print your object just like other objects.

std::cin &lt;&lt; st[2];


Overall

The first prgram is better than the second program because of the encapsulation of student. BUT arrays are not very flexable and you should be using std::vector&lt;student&gt; st; ratheer than student st[size];. The ability to resize, lazily construct objects, always know the its size are three definite advantages that vector has over an array.