Find a file in a directory

This is a discussion on Find a file in a directory within the C++ Programming forums, part of the General Programming Boards category; Why do you keep ignoring everything? Keep it managed! There is a very simple function somewhere in the framework that ...

  1. #16
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,182
    Why do you keep ignoring everything? Keep it managed!
    There is a very simple function somewhere in the framework that does what you want!
    No need for messy conversion and interop between native.

    After just a minute at msdn, I find this:
    http://msdn2.microsoft.com/en-us/library/wz42302f.aspx
    It's the same function in managed that you're trying to use native.
    Last edited by Elysia; 02-11-2008 at 02:03 PM.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  2. #17
    Registered User
    Join Date
    Dec 2007
    Posts
    383
    No I am not ignoring... It is just because I really dont know about all alternatives that really could work so I just get a bit confused.
    I did found this one too but the problem is for me how to combine or if it even was possible with browseFolderDialog as the example is so small.
    I do find it quite difficult but now I will really try to keep it managed because it feels much more clean.
    I will go for this one... Thanks again...

  3. #18
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,182
    Since it's managed, it accepts system::string^, which is exactly what folderBrowserDialog1->SelectedPath is, as well. No problems! No messy conversion. Just plain, easy code.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  4. #19
    Registered User
    Join Date
    Dec 2007
    Posts
    383
    Yes you are right. Sometimes I am to stubborn to fix things that I should do in another way. Bad side. But I kept learning about LPCSTR and LPWSTR last 10 hours :-P. I will really try to keep things clean.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  2. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  3. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  4. Help Required!!!!!
    By bobthebullet990 in forum C Programming
    Replies: 14
    Last Post: 11-27-2005, 02:56 PM
  5. Replies: 3
    Last Post: 03-04-2005, 01:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21