|
Christian Graus wrote: One byte where ?
He said one 'Bite'. Maybe it's an animal class or something.
led mike
|
|
|
|
|
Hi Nandu,
There will not be any implicit functions created. However it just follows the simple rule
"Types can not be of ZERO size".
Cheers,
Suresh
|
|
|
|
|
Function does not need space (data)...
|
|
|
|
|
|
Hi everyone,
I am using mysql 5.0.
I have a problem with my c++ application using mysql.
I compiled everything without any trouble.
Localy appliction works perfectly but when I upload it crash comes emediately.
Remotely I cannot use any function regarding mysql.
When I use mysql_init() application crashes.
Whitout mysql application is working.
On the server installed version of mysql is 5.027.
I cannot understand mistake.
If anyone can help me I would appreciate it very much.
an-arhos
Edit/Delete Message
|
|
|
|
|
What do you mean by crash?
How does this relate to managed C++?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
The first three posts in this forum invoke a giant and produce visions of Fish Filet
led mike
|
|
|
|
|
Definitely! I'm torn - I'm not sure if the first or the third is "better"!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
O M G
Thanks man!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I was thinking we should start a FFOTD Award (Fish Filet of The Day) but I became concerned that McD's might not be able to keep up.
Also did you see my reply where I offered this Google Search[^]
I think I will be using that fairly often.
led mike
|
|
|
|
|
led mike wrote: I became concerned that McD's might not be able to keep up.
Yeah - I'm not sure about them keeping enough in stock, but there should be no shortage of
employees to prepare them!
led mike wrote: this Google Search[^]
Excellent! It's so good I'm not sure if I should laugh or sigh
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Is there any link which talks about file handling in mc++.
I have to specify the write mode for the file. I mixed both managed and unmanged code. From managed code i have to call unmanged code with the first parameter file name second parameter file mode(write mode)..How to specify the file mode.
pOap->Open(szTemp,FileWriteMode);
|
|
|
|
|
Hello ...If I have values for "H","D" given from the interface and I want put a message if the value for D from the interface is grater then 2*H
(let say I give value from the inteface for H=230 and for D=700 but 700>2*H to show me an error that "You must specify D less than 460 "
if (D > 2*H)
{
MessageBox::Show("You must specify D less then ......2*230(2*H).... ", "Error", MessageBoxButtons::OK, MessageBoxIcon::Error, MessageBoxDefaultButton::Button1/*, MessageBoxOptions.DefaultDesktopOnly*/);
return;
}
Y don't know if I can use MessageBox for this..can you help me...please
|
|
|
|
|
You could use String.Format() to format the string...
MessageBox::Show(String::Format("You must specify D less then {0} (2*H)", (H*2).ToString()),
"Error", MessageBoxButtons::OK, MessageBoxIcon::Error, MessageBoxDefaultButton::Button1/*,
MessageBoxOptions.DefaultDesktopOnly*/);
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
if (D > 2*H)
{
AfxMessageBox(CString("You must specify D less then ......2*230(2*H).... "));
return;
}
It will work.
Anurag Gandhi.
Bangalore, India.
|
|
|
|
|
|
When i compile my application in release mode i am getting the below warning
Warning 1 warning LNK4248: unresolved typeref token (0100001E) for 'CRawChro'; image may not run FConvert.obj
But there is no class or variable or struct whi the name CRawChro.
Where to look for this kind of warning.
Thanks in advance.
Regards, Eswari
|
|
|
|
|
when i looked into the google it said provide stucture definitions. I have two structures in the class and they are as follows:
public ref struct FConvertRecord
{
public:
String^ szSourceName;
String^ szSourcePath;
String^ szDestName;
String^ szDestPath;
String^ szError;
ConversionStatus eStatus;
ConvertFileFormat eSourceFormat;
ConvertFileFormat eDestFormat;
bool bSourceIsRemote;
bool bDestinationIsRemote;
bool bCommandLineProcessing;
int iReserved;
int iErrorId;
};
public ref struct FConvertFileFormatInfo
{
public:
ConvertFileFormat eFormat;
String^ szFormatName;
String^ szFilter; // should be NAME.EXT or *.EXT or NAME.* etc
unsigned long ulAttribs; //Can Be SFGAO_FILESYSTEM to indicate FILE or SFGAO_FOLDER to indicate Directory.
};
But there is no CRawChro in the project. What is the warning pointing to?
Regards, Eswari
|
|
|
|
|
I am looking for examples on how to do this. I found one article in CP that looks like what I want, except that it is done using CSS (http://www.codeproject.com/useritems/Outlook_Style_Menu.asp[^])
What I want is a menu bar that collapses into the side of a dialog window and can be pulled-out when needed - like what one sees in video/media players.
Thanks,
Johnny
|
|
|
|
|
hi..i've a problem with a prject in Visual c++...i've this class:
class A{
public:
A();
void jpeg_received(jpg_t* jpg);
void exit_capturing(int code);
int rec(void);
public:
camaddr_t camaddr;
CAPID capid;
};
A::A()
{...}
void A::jpeg_received(jpg_t* jpg)
{....//code to save a file jpg...}
void A::exit_capturing(int code)
{....//code to print a result for code's value...}
int A::rec(void)
{.......
capid=ccap_start_capturing(&camaddr,jpeg_received,exit_capturing);
..........}
I've to pass to ccap_start_capturing
(function defined in a 'c file' of another project
PUBLIC CAPID ccap_start_capturing(camaddr_t* camaddr, void(*jpeg_received)(jpg_t* jpg), void(*exit_capturing)(int code) )
two function "jpeg_received" and "exit_capturing" but i've this compile error:
.\A.cpp(114) : error C3867: 'A::jpeg_received': function call missing argument list; use '&A::jpeg_received' to create a pointer to member
.\A.cpp(114) : error C3867: 'A::exit_capturing': function call missing argument list; use '&A::exit_capturing' to create a pointer to member
Can anyone help me?
Thanks, regards.
|
|
|
|
|
This should be posted on the Visual C++/MFC[^] board.
The error messages state what needs to be done to get the address of a member function.
Note that this still won't compile because the member functions are not declared static, which
means there's an implicit "this" pointer passed to the methods.
One way to get it to compile:
class A
{
public:
A();
static void jpeg_received(jpg_t* jpg);
static void exit_capturing(int code);
int rec(void);
public:
camaddr_t camaddr;
CAPID capid;
};
...
CAPID capid = ccap_start_capturing(..., &A::jpeg_received, &A::exit_capturing);
Note that static methods cannot access non-static member variables/methods.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
The question is as follows:
(Settling time of Dijkstra’s Algorithm)
Write a program, which generates a network with a controllable number of nodes, N. The easiest way to do this is to start with a rectangle with sides X and Y. Use a pair of random numbers, rx(n) and ry(n), to set the coordinates of point, n at X rx(n) and Y ry(n).
Allow n to cover the range 1 to N. Your program must then decide whether a link exists between every pair of nodes in the network. This can easily be done, based on the distance between them. For example, it could be decided that a link exists if the distance between two nodes is less than a certain distance. Or a link could exist depending on some probability function of the distance between them.
Repeat the following experiments with N = 32, 64, 128 and 256.
Extend the program so that it simulates the operation of Dijkstra’s algorithm. This program should carry out the operations of Dijkstra’s algorithm for one node at a time. Start the program with a fixed set of link costs, perhaps one. Plot the settling/convergence time. Note, convergence time is the number of steps it takes to reach a stable routing table.
Allow the program to continue running until all routing tables have stabilized. Now change the value of one link only, and again allow the program to run until all routing tables are stable. Measure the time taken (or the number of iterations) to reach stability. Repeat this experiment 100 times (each time with a different link being changed) and find the average settling time. Also, plot a graph that shows the average time taken for the Dijkstra’s algorithm to converge for different number of links being changed.
In this experiment, simulate the behavior of the network when all routers update their routing tables at the same time. That is, using the same set of link costs. Assume that 150 Mbps is the average traffic offered between each pair of nodes. Experiment also with different number of node pairs. The utilization and the link costs are calculated using the total traffic on a link in either direction. Does the network come to a stable state? What is the settling time? Does the amount of traffic entering the network influence Dijkstra’s settling time?
Repeat the previous experiment where each router updates their routing tables, one at a time, and the traffic is re-calculated between updates. Does the network converge? Plot the settling time.
In your discussions, you must explain the impact of node density (i.e., the number of neighbors a node has) and number of nodes on route convergence.
|
|
|
|
|
Sounds like fun. Is your homework in C++/CLI, or have you both asked a question that no-one is going to answer ( that is, asking for a complete solution to your homework ) AND asked it in the wrong place ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|