что делает процедура пропуска?

Я пытаюсь определить, что делает этот код?

#include <cstdlib>
#include <iostream>
#include<string.h>

using namespace std;

char *skip(char *p,int n)
{
    for (;n>0;p++)
        if (*p==0) n--;

    return p;      
}

int main(int argc, char *argv[])
{
    char *p="dedamiwa";
    int n=4;
    cout<<skip(p,n)<<endl;
}

Когда я запускаю его om dev c ++, он пишет

`basic_string::copy`

Когда я запускаю его на ideone.com, он пишет

prog.cpp: In function ‘int main(int, char**)’:
prog.cpp:15: warning: deprecated conversion from string constant to ‘char*’
prog.cpp:18: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result
0
задан BЈовић 22 October 2011 в 07:40
поделиться