Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 16:36

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C++] StartupPath

Discussion on [C++] StartupPath within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
Secredo's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 355
Received Thanks: 106
[C++] StartupPath

Hey,

Weiß jemand wie ich den Startpfad meiner Anwendung bekomme?
Ich benutze natives C++ KEIN .NET. ;D
Leider hab ich auch nicht das normalerweiße am Programmstart mitgegebene Argument "argv" in dem normalerweiße auch der Programmpfad steht...
Vllt gibt es ja ieinen Api Befehl dafür? :/
Danke schonmal im vorraus!

MfG Secredo
Secredo is offline  
Old 08/31/2010, 02:35   #2
 
Madd Eye's Avatar
 
elite*gold: 260
Join Date: Apr 2010
Posts: 229
Received Thanks: 142
Code:
Application::ExecutablePath;
Liefert den Pfad der Exe zurück ^^
Madd Eye is offline  
Thanks
1 User
Old 08/31/2010, 05:19   #3
 
Secredo's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 355
Received Thanks: 106
Quote:
Ich benutze natives C++ KEIN .NET. ;D
Das ist leider .NET, kein natives C++... :/
Bin noch totaler C++ Anfänger, grade von C# umgestiegen...
Aber trotzdem danke!

MfG Secredo
Secredo is offline  
Old 08/31/2010, 10:50   #4
 
Noisuf-X's Avatar
 
elite*gold: 38
Join Date: Dec 2008
Posts: 1,339
Received Thanks: 462
bei nativen C++ Code hast du doch schon alles in den Standartübergabe Parametern
Quote:
#include <iostream>

int main(int argc, char **argv)
{
std::cout << argv[0] ; // enthält den Startpfad
}
Noisuf-X is offline  
Thanks
1 User
Old 08/31/2010, 11:35   #5
 
elite*gold: 0
Join Date: Mar 2010
Posts: 46
Received Thanks: 63
Mit der Funktion _get_pgmptr.
phrenesis is offline  
Thanks
2 Users
Old 08/31/2010, 11:39   #6
 
Secredo's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 355
Received Thanks: 106
@ Noisuf-X
Quote:
Leider hab ich auch nicht das normalerweiße am Programmstart mitgegebene Argument "argv" in dem normalerweiße auch der Programmpfad steht...
;D

@ phrenesis
Danke werde ich gleich ausprobieren!

//Edit
Juhu, es funzt!
Vielen dank nochmal!


MfG Secredo
Secredo is offline  
Old 08/31/2010, 12:10   #7


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,908
Received Thanks: 25,409
GetGurrentDirectory

oder

GetModulefileName
MrSm!th is offline  
Thanks
1 User
Reply




All times are GMT +1. The time now is 16:38.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.