Visual c++ libraries

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2004
Posts: 3
Reputation: diegomoreno is an unknown quantity at this point 
Solved Threads: 0
diegomoreno diegomoreno is offline Offline
Newbie Poster

Visual c++ libraries

 
0
  #1
Jan 1st, 2005
Hi, just wanna ask if c++ opendir,readdir and closedir code can be implemented in visual c++, i have resently started using this complier and dunno what libraries have changed and if some of these sentences are still valid, and if u can recommend me some kind of "migrating c++ to visual c++" tutorial ill really apreciate it
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 445
Reputation: 1o0oBhP is an unknown quantity at this point 
Solved Threads: 6
1o0oBhP's Avatar
1o0oBhP 1o0oBhP is offline Offline
Posting Pro in Training

Re: Visual c++ libraries

 
0
  #2
Jan 1st, 2005
i would assume if it is MSC++ to MSVC++ then the libraries would be the same? if not there is a brilliant fstream tutorial in the c/c++ tutorials forum that - from the names of the functions - sounds like it could be used to do the same thing; and of course fstream is part of the ANSI standard (ie all compilers support it)
http://sales.carina-e.com

no www
no nonsense

coming soon to a pc near you! :cool:
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,625
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 715
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Visual c++ libraries

 
0
  #3
Jan 2nd, 2005
>just wanna ask if c++ opendir,readdir and closedir code can be implemented in visual c++
They're not supported by the library, but you can write versions of them if you really want to using FindFirstFile and FindNextFile.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 3
Reputation: diegomoreno is an unknown quantity at this point 
Solved Threads: 0
diegomoreno diegomoreno is offline Offline
Newbie Poster

Re: Visual c++ libraries

 
0
  #4
Jan 2nd, 2005
Originally Posted by Narue
>just wanna ask if c++ opendir,readdir and closedir code can be implemented in visual c++
They're not supported by the library, but you can write versions of them if you really want to using FindFirstFile and FindNextFile.
thx for the tip, but vc++ has similar functions to browse directories\ get files attributes like readdir/findfirst/next? if u can post the names of that kind of functions it will really help me a lot; or maybe a sample code that implement those.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,625
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 715
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Visual c++ libraries

 
0
  #5
Jan 3rd, 2005
>if u can post the names of that kind of functions
Are you blind? I gave you the two functions that you need to do what you want to do, whether it's faking POSIX functions, or solving your problem with the straight Windows functions. Now go to MSDN and do the research on them. And in case you missed it the first two times:

FindFirstFile and FindNextFile

Geez.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,003
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 928
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Visual c++ libraries

 
0
  #6
Jan 3rd, 2005
I know this is very old code from the attic and dusted off a little. It might give you a hint or confuse you totally.
[php]
// read the filenames from a given directory

// globals
#define MAXFILES 1500 // maximum filenames in buffer
char fbuf[MAXFILES][80]; // filename buffer
int fbntotal; // total number of filenames in buffer

struct {
char reserved[21];
char attribute;
int time;
int date;
long size;
char name[13];
} dirdata; // structure for directory info

...

// read the files in the directory specified in path
// needs full pathname consisting of drive, path and dirname
// reads filenames into a global buffer
void fs_readdir(char *path)
{
int k, done;

done = findfirst(path,&dirdata,0);
for (k = 0; !done; k++)
{
sprintf(fbuf[k],"%s",dirdata.name);
done = findnext(&dirdata);
if (k >= MAXFILES)
break;
}
fbntotal = k; // total entries in filename buffer
}
[/php]
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC