|
because you're leading to name collisions.
your can confuse the compiler with 2 classes which have the same name, just because it doesn't know to search whether the std:: namespace, the glogal one, or another namespace you just import entierely.
it's commonly accepted to avoid the using namespace std declaration, but if you really need it, then don't do it in a header file (and worst in stdafx.h, because the entiere application includes it !!!).
prefer using namespace std inside shorter scopes like functions
|
|
|
|
|
Great here it comes.
Thank you. it works now. O errors.;)
"The Ultimate Limit Is Only Your Imagination.
|
|
|
|
|
having the code compiling doesn't mean it's very clean. let's continue on our first investigation, if you like so.
|
|
|
|
|
toxcct wrote: having the code compiling doesn't mean it's very clean. let's continue on our first investigation, if you like so.
yeah sure. let's Continue on our First investig. But i hope that it runs
"The Ultimate Limit Is Only Your Imagination.
|
|
|
|
|
Hi all,
int nLen = onlyFName.GetLength();
LPCSTR lpszBuf = onlyFName.GetBuffer(nLen);
compiling this code in VC2005 gives this error:
error C2440: 'initializing' : cannot convert from 'wchar_t *' to 'LPCSTR'
|
|
|
|
|
Why do you need a LPCSTR ?
I mean, you have several options:
(1) Make an ANSI build of your code instead of a UNICODE one (default on VC2005). And your code will compile.
(2) Use LPCTSTR instead of LPCSTR , and probably, your code will be happy with this (since it is a UNICODE build).
(3) If you try point (2) and it doesn't work (maybe there is explicit use of ANSI functions in your code) the you have to convert the wide-character string to the ANSI counterpart
(may use WideCharToMultiByte for the purpose).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
neha.agarwal27 wrote: LPCSTR lpszBuf = onlyFName.GetBuffer(nLen);
Since VS2005 defaults to Unicode, simply change LPCSTR to LPCTSTR instead.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hai,
i am new to ISAPI Filter, i want a sample program in ISAPI filter to change the html content or Dispaly a text through the ISAPI filter.
how to do this..?
reply me
Jothi.G
Born to win...!
|
|
|
|
|
Can visual c++6 mfc convert the bmp file to pdf file ? If it can be how is it possible please give me some hints.
|
|
|
|
|
What about making a programm to open the bmp file, show it in the window and print it to the acrobat pdf distiller (phantom printer)?
If you want to make the transformation "on the fly" you will need to know how the pdf stores the data, how the bmp stores the data and make a conversion. I you have luck, searching in the web can give you some coded snippets, if you have to programm it by yourself... good luck.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Actually I have open the bmp file and need to convert in pdf (not to print) and i need to send that file through e-mail.
|
|
|
|
|
Adobe has a plugin that creates a phantom printer and creates a pdf. If you are able to print the bmp in a normal printer, then you are able to print the pdf.
Just save the bmp as a pdf... is going to be difficult. Not impossibl, but difficult (and I can not help u with it)
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hello all,
Do anybody have some idea of the Rinjdael algorithm? I ahve encryt some data from this algo but i am not geeting anything accurate on web. Please tell me the logic of the algorithm.
Neema Jain
|
|
|
|
|
i.e. Mathematics and Algorithms
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Rijindael is a more flexible scheme of AES. Unlike AES which has a fixed block size, 128 bits, Rijindael supports both key size and block size of 128, 192 and 256 bits.
Which crypto API do you use? In general,
+ Since it is a block cipher, make sure you use the same cipher mode during Encryption and Decryption.
+ For ECB and CBC mode, you must process data in multiples of the block size.
+ Take care of data padding if needed.
+ Process your Initialization Vector properly
+ Of course you should verify the encryption key is the same as the decryption key
Toe the line
Thread the needle
Think outside of the box
|
|
|
|
|
Hi,
How to determine the cursorfocus whether it is in the dialog or on the control.
Thanks and Regards,
Mayank
|
|
|
|
|
use CWnd::GetFocus [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
hai,
Try this...
CWnd* SetFocus( );
Born to win...!
|
|
|
|
|
Hello,
I am doing the following to execute a stored procedure in SQL from VC++. But the procedure is not executed.There is some problem with the SQLBindParameter().
SQLHENV henv = SQL_NULL_HENV;
SQLHDBC hdbc1 = SQL_NULL_HDBC;
SQLHSTMT hstmt1 = SQL_NULL_HSTMT;
RETCODE retcode;
retcode = SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv);
retcode = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION,
(SQLPOINTER) SQL_OV_ODBC3, SQL_IS_INTEGER);
retcode = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc1);
UCHAR szDSN[15] = "planodbcsql";
UCHAR szsa[10] = "sa";
UCHAR pass[10] = "";
UCHAR query3[30] = "{call tryproc(?)}";
Pithaa
continued in next mail
-- modified at 6:05 Thursday 29th November, 2007
|
|
|
|
|
Hello,
I was not able to mail it in one message so I have posted 2 messages
retcode = SQLConnect(hdbc1,szDSN, SQL_NTS,szsa, SQL_NTS,
pass, SQL_NTS);
retcode = SQLAllocHandle(SQL_HANDLE_STMT, hdbc1, &hstmt1);
SQLINTEGER ind2 = SQL_NTS;
const char* Param2 = "Mumbai" ;
retcode = SQLBindParameter(
hstmt1,
3,
SQL_PARAM_INPUT,
SQL_C_CHAR,
SQL_VARCHAR,
32,
0,
(SQLCHAR*) Param2,
0,
&ind2);
retcode = SQLExecDirect(hstmt1,query3,SQL_NTS);
In the above SQLBindParameter() 3 is one of the parameters because I am referrring to 3 column of table.
Prithaa
|
|
|
|
|
ParameterNumber must be 1 because you are setting the first parameter of the query. The number of columns in the table isn't relevant.
Additionally, you must use SQLPrepare() and SQLExecute() instead of SQLExecDirect() with SQLBindParameter() .
|
|
|
|
|
prithaa wrote: But the procedure is not executed.There is some problem with the SQLBindParameter().
So what does it return?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
The SQLBindParameter returns -1 .It returns error.
Pritha
|
|
|
|
|
Which means you are then supposed to call SQLGetDiagRec() .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
Do you have any idea regarding what is the maximum number of string ID's that can be created safely in the vc++6.0, for a project in which the DLL is statistically linked.
For example, for many string id 'values', we have another resource defining the same memory location pointed for the string table value. which leads to many errors during compiling.
The error is detailed in : http://support.microsoft.com/kb/q194299/[^]
Hence, i would like to know what is the maximum val of strings that can be added safely without producing such errors.
Thankyou!
-- modified at 6:19 Thursday 29th November, 2007
-- modified at 6:24 Thursday 29th November, 2007
Priya Sundar
|
|
|
|