|
the information u provide get me nothing to help with solving
some code?
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
hi,
My problem was solved!
thank you
|
|
|
|
|
i use vc6.0 to access data table in Access of MS, but the data table that i will access is built by the other program. i want to get the new data that program put into the table. because the program often put data into the table, i want to know when it change the table, and i want to get the new data that is put into table after the table is changed. Can Access of MS inform me?
|
|
|
|
|
in ms sql server the solution is to implement triggers to the tables changes u want to be notified. i dont know about access. does it support this...
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
Hi to all, I am programming a dialog based application. My problem is, if I close the program, I want to prompt a message box asking the user if they really want to exit the application, if the user choose no, the application continues, if the user choose yes, the application exits.
Thank you in advance,
quistiun
|
|
|
|
|
Try overriding OnClose() and either call CDialog::OnClose() or just return, based on the return value of your confirmation dialog box.
Steve
|
|
|
|
|
Tnx a lot... I'll try it..
|
|
|
|
|
What am I doing? I want my template class to send an exception when one of input parameters is out of range.
How am I doing that? The main parts of the source code are presented below.
Does it work? Yes, it does. The exception is being sent and caught in the program passing wrong input parameters, error message is successfully displayed.
So, what is wrong? I receive a strange warning during compilation: Warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
I don't know what's wrong with it, but I don't like warnings... especially those that I don't understand. If you can tell me what the compliler (MS VC .NET) wants from me I will be very grateful to you. Thank you!!!
#define CLogicError std::logic_error
#define STRING std::string
class CMyError : public CLogicError
{
public:
CMyError(const STRING& what_arg) : CLogicError(what_arg) {};
};
template<class T> class TMy
{
...
T& operator()(const int nRow, const int nCol) throw (CMyError);
...
}
template<class T> T& TMy<T>::operator()(const int nRow, const int nCol) throw (CMyError)
{
...
}
The warning points to the line
T& operator()(const int nRow, const int nCol) throw (CMyError);
in class definition. It does not seem to like "throw (CMyError)" part. If I change it to "throw()" the compiler stops complaining.
|
|
|
|
|
It simply means that the compiler doesn't support exception specifications (semantically). That is, the compiler does not generate code to enforce the rule that the function can't throw *any* exception other than CMyError . You can try it out, try throwing any other exception, it will still be caught in the corresponding catch block, but according to the standard, it must result in a call to unexpected and then aborting of the program.
throw() means that your function is not allowed to throw exceptions at all, I don't know why that doesn't result in a warning? May be VC++.NET supports just that special case?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi Senthil,
Thank you for the response.
throw() does not lead to any warnings at all. I tried as you suggested and in fact caught other exception as well. The debugger still reported about an "unhandled exception" though but did not abort my program. When I throw the correct type of exception the debugger does not report about an "unhandled exception". So, I assume you are right about the compiler not enforcing the exception type upon the function that throws exceptions.
Since it is actually one of the best compilers in the world, I am a little bit skeptical that it is a compiler's fault though. I suspect and, in fact, am more inclined to think that I have done something wrong. Maybe there is an option that I have to set to force the implementation of this exception restriction upon functions? I have not found any in the project settings that has anything to do with exceptions. Or else, may it have anything to do with templates, since they are implemented in *.h file rather than in *.cpp?
|
|
|
|
|
Since it is actually one of the best compilers in the world, I am a little bit skeptical that it is a compiler's fault though. I suspect and, in fact, am more inclined to think that I have done something wrong.
No, you haven't done anything wrong. MSVC.NET does not support exception specifications except throw() , as the compiler itself and Kumar point out.
For what is worth, exception specification has become in recent years to be regarded as a design flaw in C++, so you might consider not using it. Follow this link[^] for some explanations about why exception specification is probably best avoided.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Thank you, Joaquín. It is pretty unfortunate that an ISO standard is not supported but I am going to follow your suggestion and avoid exception specifications. Thanks again!
|
|
|
|
|
i LIKE TO GET A ALGORITHM FOR SUBNETTING CLASS C NETWORK IN PROGRAMMING FORMAT SUCH AS C OR IN c++. IS THERE ANYONE WHO CAN HELP ME....PLZ HELP ME....I NEED THT AS SOON AS POSSIBLE...PLZ SEND IT THROUGH MY E-MAIL ADDRESS: zibran@cgscomm.net
I wish I'll get a reply form nyone....
Thnx to all for reading my msg.
Bye
ZIBRAM ISLAM
B.Sc(HONS) in CIS
M.Sc in Telecomm
|
|
|
|
|
is there any command-line software that could plot a graph from a file and output to a file,
|
|
|
|
|
You might be able to do something with this[^].
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 2.1.1 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
|
|
i want to create a batch file that input a c++ program the input are just integers can some give me an example of what i should do the input to the the file NNtest something like this maybe
NNtest.exe
1
0.1 0.001
3
35 5 3
3
but im not sure how to write this in a bat file
thanks
|
|
|
|
|
Try to save the data into a file and then use it as redirected input:
NNTest <AFile
|
|
|
|
|
How do you fill a CURRENCYFMT structure with the user's locale settings?
thanks.
|
|
|
|
|
|
But I need the locale info for the CURRENCYFMT struct. I want to get the user's locale settings for the CURRENCYFMT structure, change some of the members (lpCurrencySymbol, NegativeOrder) and then call GetCurrencyFormat().
|
|
|
|
|
Pass NULL in the Locale arg of GetCurrencyFormat() . See this[^] link.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Passing NULL for the Locale arg seems to stall the program. I'm not sure if I'm explaining my problem right. I don't just want to format a string with the user's locale settings. I want to get the the locale setting values for the CURRENCYFMT members, but then change some of the settings, and then call GetCurrencyFormat() to format the string. I may just be missing it, but I don't see anywhere in the documentation where GetCurrencyFormat() fills a CURRENCYFMT struct with the user's locale settings...
|
|
|
|
|
Ah.
This[^] page contains a code fragment that shows how to modify the locale's default currency symbol and pass the modified format to GetCurrencyFormat() . See the paragraph starting with "Another scenario would be ...". Hope this helps.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|