|
Ok, so just use COUNT(*), leaving the JOIN and WHERE clauses intact.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi All,
I know that the compile options \Gh gets you the _penter and _pexit, which can be used to get function level timings.
However, now the trick is how does one get to the level of saying: Line 121 took 13ms, Line 122 took 14ms, etc...?
Has anyone got any ideas or documentation to read?
thanks,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
hi all,
I have a video Player.Everytime the video player open and plays a video file,the corresponding files should be stored in folder.
1.how can i create a folder automatically.
If i give Filename=c:\\Folder1,I got error.
Please help me
cheers
sangeet
|
|
|
|
|
ramyasangeet wrote: If i give Filename=c:\\Folder1,I got error.
That's not very clear. What are you doing with Filename, post some code ('If I give' is quite vague). And what error did you get ?
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hi,
Thanks for the reply.
This is my coding.
CFile cf;<br />
CString filename;<br />
int xu_flag;<br />
CString s; <br />
if(i == 1)<br />
{ <br />
s.Format("%d", (xu_picno/2)+1);<br />
filename = "c:\\temp\\";<br />
filename+=s;<br />
filename+="F";<br />
filename+=".jpg";<br />
}<br />
else<br />
{<br />
s.Format("%d", (xu_picno/2)+1);<br />
filename = "c:\\temp\\"; <br />
filename+=s;<br />
filename+="R";<br />
filename+=".jpg";<br />
<br />
}<br />
xu_flag = cf.Open(filename, CFile::modeCreate | CFile::modeWrite);<br />
cf.Write(sp_temp, xu_len); <br />
cf.Close();
This coding is for storing each frame of video file in jpeg format.Using Xu_picno, i can able to retrive pictures.So everytime the pic no changes,the filename will also change.Like 1F,2F...
My problem is ,i have to store those picture in seperate folders.
So i need to create folder in runtime.how to do that.
help me please
cheers
sangeet
|
|
|
|
|
You can't create folder with CFile.
Use the _mkdir[^] function for that purpose.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
ramyasangeet wrote: s.Format("%d", (xu_picno/2)+1);
filename = "c:\\temp\\";
filename+=s;
filename+="F";
filename+=".jpg";
Why not use:
filename.Format("c:\\temp\\%dF.jpg", (xu_picno/2)+1);
ramyasangeet wrote: xu_flag = cf.Open(filename, CFile::modeCreate | CFile::modeWrite);
cf.Write(sp_temp, xu_len);
If the call to Open() fails, there's no need to call Write() or Close().
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
and CreateDirectory
whitesky
|
|
|
|
|
can u please give me an example.
Also do i need to declare _mkdir??
help me out
cheers
sangeet
|
|
|
|
|
ramyasangeet wrote: Also do i need to declare _mkdir??
What do you mean ?? You simply need to call this function with the name of the folder you want to create. Did you read the doc from the MSDN (the link I sent you) ? It's pretty obvious how to use it. Also, don't forget to include <direct.h> (also stated in the doc).
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
I suggest that you read msdn
CreateDirectory("c:\\test",NULL);
whitesky
|
|
|
|
|
in www.msdn.com
CreateDirectory
This function creates a new directory
_mkdir
Create a new directory.
WhiteSky
|
|
|
|
|
thanks for ur reply.
I used the create directory function.
CreateDirectory("c:\\test\\",NULL);
To create another folder named front in the test folder,i used the same method.
CreateDirectory("c:\\test\\front",NULL); ,the folder is not creating..any other way to create subdirectories??
Also i have to store jpeg files in the created subdirectory.
How to do that.
cheers
sangeet
|
|
|
|
|
you can use each name instead test use your favorite name
like this
CopyFile("c:\\a.bmp","d:\\a.bmp",1);
whitesky
|
|
|
|
|
ramyasangeet wrote: CreateDirectory("c:\\test\\front",NULL); ,the folder is not creating..any other way to create subdirectories??
try SHFileOperation api or http://www.codeproject.com/shell/cshellfileop.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ramyasangeet wrote: CreateDirectory("c:\\test\\front",NULL); ,the folder is not creating..
Are you sure that the c:\test folder exists? If it doesn't, CreateDirectory() will fail.
Why are you not checking the return value from GetLastError() ?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
I would like to know how to control the charactor spacing in the CEdit control? Please help!
|
|
|
|
|
hai everybody
i want to create a notepad using a single document application.can you please help me how can i create that application.
|
|
|
|
|
Hi,
The best way is to use the MFC framework and choose the SDI application templete...most of the functionality is alreay implemented in the same.
or you can refer the sample source code provided in the MSDN for the notepad application.
all the best.
Jitendra.;)
|
|
|
|
|
|
Can any body explain me use of Static Function and Static Class in C++/VC++
|
|
|
|
|
What do you mean by static class ? As explained previously already, there is no such thing as a static class. You can only have a static instance of the class (like any other variable). Is that what you are looking for ?
For static function, in which context is that used ? You mean a static member function ? If yes, then it means that the function is shared across all instances of the class (thus, doesn't need a particular instance in order to be called). An example is the GetCurrentTime from CTime:
CTime t = CTime::GetCurrentTime();
As you see, you don't need to declare an instance in order to call the function.
Does that answer your question ?
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
it means that without creating an instance of the class I can call its static function.
|
|
|
|
|
NiLeSh KoRpE wrote: it means that without creating an instance of the class I can call its static function.
I don't understand... Is that a question ? If yes, I just answered in my previous post: yes it means that without creating an instance, you can call a static member function of the class.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Thank U
|
|
|
|