PDA

View Full Version : [C++] dichiarazione variabile


artes82
01-12-2008, 10:34
premetto che non so programmare e non devo imparare a farlo...

dovrei installare un programma trovato su internet, ma mi dice che una variabile (basename) non č stata dichiarata. sapete aiutarmi...?

.......
int
main(int argc, char *argv[], char *envp[])
{
if (argc < 2)
{
cerr << "Usage: " << basename(argv[0]) << " [-s] bytes [seed_file]" <<
endl;
exit(1);
}
........

bob80
01-12-2008, 10:39
Probabilmente ha bisogno di qualche paramentro quando lo lanci (tipo nome di un file o parametri d'esecuzione).
Hai una piccola manualistica sul programma?
Saluti!

artes82
01-12-2008, 10:45
Probabilmente ha bisogno di qualche paramentro quando lo lanci (tipo nome di un file o parametri d'esecuzione).
Hai una piccola manualistica sul programma?
Saluti!

no... niente manuale! :(
in teoria dovrebbe essere un piccolo script linux che installa anche questo file .cpp.
solo che quando tento di installarlo mi appare:

error: basename was not declared in this scope.

:boh:

cionci
01-12-2008, 13:12
Se si tratta solo di quello scrivi la riga cosė:

cerr << "Usage: " << argv[0] << " [-s] bytes [seed_file]" <<

artes82
01-12-2008, 14:04
Se si tratta solo di quello scrivi la riga cosė:

cerr << "Usage: " << argv[0] << " [-s] bytes [seed_file]" <<

cosė sembra funzionare, grazie! ;)

Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.