C++: absolute pathname & how to access website

foges

Senior member
Mar 28, 2005
324
0
0
Three quick questions:

1) how do i enter the absolute pathname of a file. eg. when using
fstream doc1 ("doc1.txt", ios::ate | ios::eek:ut | ios::in);
i dont want doc1.txt to be located in the Dev-C++ standard folder, but rather in My Documents or something

2) what would i do if i want to tell my program to get a text file from a certain website or get the title of the website ( contained in the <title> ... </title> ) ?

3) to create windows applications (ie. not just dos/cmd ones) what program would i be best off using?

Thanks
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
1) Not sure what you mean here. You'd replace the string containing the name in your example with the full path, i.e. instead of "file.txt" it would be "c:\\somedir\\someotherdir\\file.txt". But I assume your question is not that simple.

2) What would you do? You'd write a program to use HTTP to grab the website's content, and then load it into the DOM so that you can parse out the HTML elements and their attributes.

3) Download Visual Studio 2008 Express from Microsoft.
 

foges

Senior member
Mar 28, 2005
324
0
0
Thanks just what i was looking for actually :D and if youre wondering, yes im a programming newb :(