|
I want to write a cd burn or cd maker program which can create the .iso .bin .cue files and burn it to the cdr(w).
But I can't find any reference to this. Could anyone give me an idea?Maybe the format reference? The source code,url are even good.
BTW:The source code I got are under cygwin. I need the true win32. Thanks.
|
|
|
|
|
It's been a while but try visiting the Wotsits file format collection
Wotsits
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
OK, this has probably been asked a 1000 times, so here we go with number 1001. I've been programming C++ for about 5 or so years now, and have yet to find a decent explanation of the various casting operators (reinterpret_cast<>, const_cast<>, etc.). Not to say that several don't exist on here, I just couldn't find them. So, my question is can anybody explain what each of the different C++ cast operators do? Are they part of the language, or do they belong to the STL? Where would I find a good explanation or two here?
Thanks in advance.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
They are part of the core language, and const_cast removes constness, reinterpret_cast allows casting bewtween unrelated types, static_cast does not return NULL if a cast fails, and dynamic_cast does. I'm sure there's a bit more to it than that, but I find myself using dynamic_cast the most, so it's the only one I know really well.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
They are keywords of the language. Short explanation:const_cast<> removes away const ness.
static_cast<> is used for conversions that, although well defined in C++, are not automatically applied by the compiler. Most important examples are truncating arithmetic castings (eg. from double to int ) and casting from a base class pointer to a derived class pointer.
dynamic_cast<> plays a role similar to that of static_cast<> when downcasting from a base class to a derived one, but it has the important difference that the downcasting is checked for validity at run-time, ie. dynamic_cast<> returns 0 if what you are trying to downcast to say A* is not actually a A* . For this to work, classes passed to dynamic_cast<> must be polymorphic, ie. they must have at least one virtual function.
reinterpret_cast<> is used for anything else, as conversions with no defined meaning in the standard, like for instance converting a pointer to an int .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
const_cast also removes the volatile attribute.
--Mike--
"Everyone has figured out what 'service pack' really means, so they had to go and change the language. Perhaps this is what Bill was talking about in the 'security is top priority' letter."
-- Daniel Ferguson, 1/31/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Bien sure
I forgot also to mention that dynamic_cast<> can be used not only for downcasting, but also for "crosscasting" across a multiple inheritance hierarchy: eg, if AB is an A as well as a B , a dynamic_cast<B*> on a A* will succeed when the object pointed to is an AB .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
dynamic_cast<> plays a role similar to that of static_cast<> when downcasting from a base class to a derived one, but it has the important difference that the downcasting is checked for validity at run-time, ie. dynamic_cast<> returns 0 if what you are trying to downcast to say A* is not actually a A*. For this to work, classes passed to dynamic_cast<> must be polymorphic, ie. they must have at least one virtual function.
Just want to add that dynamic_cast can be used for references also but in this case if the cast fails, it will throw a bad_cast exception (because there is no such thing as a bad reference)
Here's a link that explains the various casts in more detail: http://www.gotw.ca/gotw/017.htm
Chen Venkataraman
|
|
|
|
|
Thanks all. That clears it up quite a bit.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
i've connected the ODBC database in my app (quite easy)....but how do i generate reports thru my application or is there any way i can call Access to generate reports for me? suggestions, codes or books all welcome? plz help..
|
|
|
|
|
I think the only way is to read each record by your application and create report.you can find good information here:
http://lnrpc2.irb.hr/ebooks/0672313502/index.htm
Mazy
You can find a solution (even a foolish one) for all problems (even big ones)
|
|
|
|
|
Hi,
just you see this one may be useful for you.
Printing with MFC Made Easy by Dan Pilat in printing option of this site.
Also you can try with Crystal Reports .
anju
|
|
|
|
|
Does anyone here do code correction?
if you want to give me your email i will send you my code to look at it
if you want to help me out.
but i cannot post it here
thanks
|
|
|
|
|
Code correction. As in look through your code and find or fix errors...or just make suggestions...?
How many lines of code are we talking...?
p.s-You would get great response(I imagine) if you did post it to code project, whereas if only a few look at it...you'll get mediocre(spelling) results i'm sure.
"2 heads are better than one" - Some genius
laterz
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
774 c:\windows\desktop\datastru\main.cpp
warning: multi-character character constant
774 c:\windows\desktop\datastru\main.cpp
warning: comparison is always true due to limited range of data type
anybody knows what this is?
thanks
|
|
|
|
|
You should look up these warnings in MSDN, and you should try posting some code as well to help us answer you.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
can i send the code to your email account
coz i don't want nobody see it
please reply
thank you
|
|
|
|
|
Why don't you want anyone to see it? is your code so bad that you're embarrassed of it?
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
C:\Windows\Desktop\DataStru\main.cpp(735) : error C2100: illegal indirection
can any one tell me what this mean?
thank you
|
|
|
|
|
Seeing the faulty code could help. But it is a pointer problem, for sure
|
|
|
|
|
can anyone tell me please how do you compile and run a program that reads its input from a txt file, using the borland commmand line compiler.
or the visual C++ compiler.
thanks
|
|
|
|
|
Just push the button with the '!' on it. Or did you mean how to write such a program ?
Here is a program to read a file into a vector and then print it.
#include "stdafx.h"
#include <string>
#include <vector>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <sstream>
using std::copy;
using std::vector;
using std::string;
using std::ifstream;
using std::ostream_iterator;
using std::cout;
using std::back_inserter;
using std::getline;
using std::ostringstream;
using std::istream_iterator;
int main(int argc, char* argv[])
{
string currentLine;
ifstream str("c:\\winzip.log");
if (!str.is_open())
{
cout << "It's stuffed\n";
return -1;
}
vector<string> file_contents;
copy(istream_iterator<string>(str),istream_iterator<string>(), back_inserter(file_contents));
// Now print out the results
copy(file_contents.begin(), file_contents.end(), ostream_iterator<string>(cout, "\n"));
return 0;
}
You can use this URL to go to where I posted it before, and dissected how it works.
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=105228&tid=104762#xx104770xx
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
Picture a world without war, without hate. And I can picture us attacking that world, because they would never expect it.
|
|
|
|
|
Christian Graus wrote:
Picture the daffodil. And while you do that, I'll be over here going through your stuff
I like that :rotfl:
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
I've noticed that sometime upon exiting my program, it errors out with a "memory could not be read". While debugging I see that my string buffers are not reseting themselves. How can I go about clearing my buffers out so that I do not get this error. Or am I looking in the wrong place. I still am curious as to how I go about resetting my buffers each time........
Please be patient with me as I am a cobol programmer (but I understand C++) and in cobol you must initialize your buffers so that left over data does not stay put.
Thanks again
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Hi,
I was trying to write some string in a bitmap. Every things work fond except that I cannot change the font size. Why can I put my font in italic without any problem and I can't change my font size. This code is use in a ISAPI. Source code follow...
Thanks
Guillaume Frechette
bool Write(CString sText,int nFontType,int nFontSize,CRect cRect)
{
CClientDC dc(NULL);
CDC mdc;
CFont* pFont=NULL;
CFont* pOldFont=NULL;
CFont myFont;
LOGFONT lf;
mdc.CreateCompatibleDC(&dc);
CBitmap* pOldBitmap = mdc.SelectObject(&m_Image);
BITMAP bmp;
m_Image.GetBitmap(&bmp);
pFont = mdc.GetCurrentFont();
if(pFont){
pFont->GetLogFont(&lf);
lf.lfHeight = -MulDiv(nFontSize,
GetDeviceCaps(dc.GetSafeHdc(),LOGPIXELSY),72);
lf.lfWidth = 0;
lf.lfItalic = 1;
myFont.CreateFontIndirect(&lf);
}
else
return false;
pOldFont = mdc.SelectObject(&myFont);
mdc.DrawText(_T(sText),cRect,DT_LEFT|DT_VCENTER|DT_SINGLELINE);
dc.BitBlt(0,0,bmp.bmWidth,bmp.bmHeight,&mdc,0,0,SRCCOPY);
if(pOldFont)
mdc.SelectObject(pOldFont);
CBitmap* pNewBitmap = mdc.SelectObject(pOldBitmap);
return true;
}
|
|
|
|