Hi!
I want to learn C# in the near future. But for now, I would be more than
happy if someone could translate this short c# source code into c++. (I
searched the web for c++ equivalents but after one hour i am too frustrated,
and so i hope you can help me)
using System.IO; ... SHDocVw.ShellWi ndows shellWindows = new
SHDocVw.ShellWi ndowsClass(); string filename; foreach
(SHDocVw.Intern etExplorer ie in shellWindows){ filename =
Path.GetFileNam eWithoutExtensi on(ie.FullName) .ToLower(); if
(filename.Equal s("iexplore") ) Console.WriteLi ne("Web Site : {0}",
ie.LocationURL) ; if (filename.Equal s("explorer") )
Console.WriteLi ne("Hard Drive : {0}", ie.LocationURL) ; }
Here's the start of the c++ code:
#include <windows.h>
#using <mscorlib.dll >
#include <iostream>
#include <string>
using namespace System;
using namespace System::IO;
using namespace System::Collect ions;
void main()
{
....
}
Thank you very very much!!
I want to learn C# in the near future. But for now, I would be more than
happy if someone could translate this short c# source code into c++. (I
searched the web for c++ equivalents but after one hour i am too frustrated,
and so i hope you can help me)
using System.IO; ... SHDocVw.ShellWi ndows shellWindows = new
SHDocVw.ShellWi ndowsClass(); string filename; foreach
(SHDocVw.Intern etExplorer ie in shellWindows){ filename =
Path.GetFileNam eWithoutExtensi on(ie.FullName) .ToLower(); if
(filename.Equal s("iexplore") ) Console.WriteLi ne("Web Site : {0}",
ie.LocationURL) ; if (filename.Equal s("explorer") )
Console.WriteLi ne("Hard Drive : {0}", ie.LocationURL) ; }
Here's the start of the c++ code:
#include <windows.h>
#using <mscorlib.dll >
#include <iostream>
#include <string>
using namespace System;
using namespace System::IO;
using namespace System::Collect ions;
void main()
{
....
}
Thank you very very much!!
Comment