|
Try:
#include <stdio.h><br />
remove(const char *filename);
|
|
|
|
|
Del is not a program. It's a shell builtin, just like dir is. Thus, system doesn't know what Del is. There is no del.exe.
Use DeleteFile if you're using Win32 code, or remove if using standard C code.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
Erik Funkenbusch wrote:
Del is not a program. It's a shell builtin, just like dir is. Thus, system doesn't know what Del is. There is no del.exe.
del.exe doesn't exist, but system() doesn't launch programs. it executes shell's commands, just as del , dir , cls ...
if you try system("cls"); , your screen (in console mode, of course) will be cleared...
the problem in monageasmear's code is that he doesn't enclose the system() 's parameter into "" ...
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
i think if you had written
system("del filename"); if would have worked.
first, you must know the del shell's command syntax ;
secondly, if you had a look at the MSDN, you would see that system() gets a LPCTSTR , it means a const TCHAR* , that's why i use a string parameter...
and to finish, system() is not recommended, as Graham Bradshaw , [DFS] Zero and Erik Funkenbusch said...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi,
I'm using a ginastub on my workstation and I need to switch between two differents GINAs asking to press a keyboard to select one or another.
Is it possible to use the _kbhit function into the MyInitialize ginastub func?
|
|
|
|
|
sorry im new to c++i no this is a simple problem but help would be greatly appreciated
convert an int to a string?
cheers
|
|
|
|
|
_itoa
CString::Format
sprintf
strstream class
etc
Many different ways
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
sorry can you please post the code example
int fig = 2;
string string1;
thanks
|
|
|
|
|
try using string streams from sstream.h
int fig = 2;<br />
std::string string1;<br />
<br />
std::ostringstream oss;<br />
oss << fig;<br />
string1 = oss.str();
|
|
|
|
|
int fig = 2;
string string1;
strstream stream;
stream << fig << ends;
string1 = stream.str();
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Don't use streamstring, it is VERY SLOW.
sprintf works must faster.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
CString str;
int i=5;
str.Format("The integer Number is : %d",i);
|
|
|
|
|
The fastest method is the following:
int i = 5135;
char String [64]; // REALLY big number
_itoa (i, String, 10);
Using the other methods discussed are slow and involve the memory manager which will cause all sorts of performance issues.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
i am writing a file in a loop but dont want to rewrite over the file is there a command i can put in so as to rename the file to example a integer so i can bump the integer and the file name will be different for each iteration of the loop
cheers
|
|
|
|
|
|
CFile::Rename
SHFileOperation
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Wrong forum!
Don't try it, just do it!
|
|
|
|
|
Hi there,
I'm looking for a (open-source) library to implement MFC SDI/MDI control bars, which have to feature to fix their vertial size. I tried Prof-UIS, but I haven't found a good possibility to fix the vertical size. I want to create a child window inside that control bar, which contains controls.
That has the problem that when I resize the control bar, then the buttons will be outside the client rect.
Any suggestions?
Thx
Don't try it, just do it!
|
|
|
|
|
I have 2 code *.cpp & *.h. I want to add 2 this file into MFC program, but I can not......
anyone can help me (point me step by step), thanks!
my E-mail: khonglaai2002@yahoo.com
|
|
|
|
|
Under the Project menu is an Add sub-menu. From there you can add files to an existing project.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi All... I am unable to adjust the output volume of media. Specifically, I've been working with DirectShow, playing .mpg, .mp3, .avi, .wmv... There's a IBasicAudio class that I can't make work, tho it seems like it should.
to clarify an example, let's say there's 2 media files, one recorded with low quality/volume, one recorded with high q/v... does anyone have any ideas how I could programmatically adjust the volume as they're played?? doesn't have to be DirectShow, but it'd be nice if it was...
thanks All
barnje07
|
|
|
|
|
Does this article help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I guess I didn't explain my problem as clearly as I had thought. I need to adjust the volume of the stream, not the device. For example, if two media are playing simultaneously, and they differ vastly in volume, how can 1 stream be adjusted such that the output is roughly the same?
any ideas?
|
|
|
|
|
barnje07 wrote:
any ideas?
Not a one. Sorry.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I am developing directx filters based application and while building the project i am facing this problem. I think this problem is a general one.
CaptureFilter error LNK2020: unresolved token (0A000014) new
CaptureFilter error LNK2020: unresolved token (0A000029) delete
Can you tell me why i am getting this error?
thankx
|
|
|
|