Is there a simple way to create a folder using C ?

  • Thread starter Thread starter Sky2004
  • Start date Start date
AI Thread Summary
The discussion revolves around two programming questions posed by Yingtian regarding Visual C++. The first question inquires about pre-specifying the size and location of a command prompt window for an application. The responses indicate that there is no known method to achieve this. The second question asks for a simple way to create a folder using C. Warren suggests using the `mkdir` function, but Yingtian points out that this may only work on Unix systems and seeks an equivalent for Windows XP. Warren confirms that `mkdir` is also available on Windows, implying that it can be used for folder creation in that environment.
Sky2004
Messages
2
Reaction score
0
Hi! :frown:
I have 2 programming questions here. Hope you could help me with it.

Q1) Is there a way to pre-specify the size and location of command prompt window that runs along with my application written using Visual C++ ? Be it using C or some batch command?

Q2) Is there a simple way to create a folder using C ?


Thank you,
Yingtian.
 
Computer science news on Phys.org
1) not that I'm aware of.

2) #include <sys/types.h>
#include <sys/stat.h>

int mkdir (const char *path, mode_t mode);

- Warren
 
Thanks for your reply!

For Q2), the mkdir u suggested seems to work only for unix? I forgot to say that I am using windows xp...so...is there an equivalent simple syntax for it?

Regards,
Yingtian.
 
I'm pretty sure mkdir exists on windows as well.

- Warren
 
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Back
Top