It is currently Sat Jul 11, 2020 7:35 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: getenv_("") not defined
PostPosted: Sun Jun 20, 2004 5:21 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:51 pm
Posts: 2808
Location: Portugal, Lisbon
I get an error when i try this:

currentpath.s=getenv_("PWD")

gcc: c: No such file or directory

here's the c example code:

Code:
#include
#include
int main()
{
char my_env[10];
char *return_val=NULL;
printf("Please enter the variable\n");
scanf("%s", my_env);
return_val=getenv(my_env);
if(return_val == NULL)
printf("Error: There is no %s\n", my_env);
else
printf("%s=%s\n", my_env, return_val);
return 0;
}

_________________
Software: http://xipa.org
Elevator Maintenance: http://central-elevadores.pt
Good web hosting!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jun 20, 2004 7:54 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5810
Location: Germany
Why not use this one?
http://forums.purebasic.com/english/vie ... 7962#57962

Timo

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye