|
Thank you, Saurabh !
(I would prefer to use UNICODE
since there is no a "size-fixed character type" (like TCHAR )
to use with MBCS sequences, and it (MBCS) is not fully supported in MFC... )
virtual void BeHappy() = 0;
|
|
|
|
|
You are welcome. If you are interested then you can read more about it in excellent articles from Michael Dunn.
http://www.codeproject.com/KB/string/cppstringguide1.aspx
http://www.codeproject.com/KB/string/cppstringguide2.aspx
-Saurabh
|
|
|
|
|
|
Hi,
Im writting mpeg files into ASF container.Its written successfully and run on VLC fine.But its not getting played in WMP.First,it shows the error message as "DX50 codec is not installed on ur system"..so,i have installed.still its npt getting played in WMP even its showing the corrct time.video is missing.how to solve this?
|
|
|
|
|
it looks WMP doesnt know the codec. Somethings missing in the installation for WMP.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
how to create document for .c files which consists of only code in it and does not have any comments included in it.when i am trying to create document using doxygen for the .c files of linphone 3.2.1 then i am getting a warning i.e.
compound _linconfig does have any document...and so on for many .c files...help needed urgently..
itsmesheen@rediffmail.com
|
|
|
|
|
It's all described here[^].
txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
It can generate an on-line documentation browser (in HTML) and/or an off-line reference manual (in $\mbox{\LaTeX}$) from a set of documented source files.
where in my case the .c files are just with code not even a single comment i.e not at all documented..k??/
now which software will help me out...to know the functions defined in that particular .c file and what all are the called functions, calling functions...what are the input parameters with output parameters.....now reply
|
|
|
|
|
itssheen wrote: what are the input parameters with output parameters.
The link I gave you is to the doxygen system, try reading the documentation to find out what you can and cannot do with it.
itssheen wrote: now reply
Tempted as I am, I wil refrain from responding in kind to this rude ending to your message.
txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
itssheen wrote: .....now reply
As has been said, this is kinda rude.
But trying to answer your question... Doxygne is not psychic, it is just a tool to extract formatted comments from your code. If those comments don't exist, then you're just going to have to write them!
This is not as bad as it sounds - I had to do the same from scratch to a project, and I found lots of code that could be refactored as I went. I reduced the code size by a good 5%. That means 5% less bugs!
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
Hi,
i am working in console application in VC++(visual studio 2005).
i am having a problem while using CString.
i have mentioned sample code below.
#include "stdafx.h"
#include "server1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// The one and only application object
CWinApp theApp;
using namespace std;
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
int nRetCode = 0;
// initialize MFC and print and error on failure
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
// TODO: change error code to suit your needs
_tprintf(_T("Fatal Error: MFC initialization failed\n"));
nRetCode = 1;
}
else
{
CString str;
str="IP conneted"
printf("%s",str);
cout<<str;
}
return nRetCode;
}
while executing the code..
i get printed only first letter(I) of str.
so please help me..
is there any header or setting should i change in the visual studio environment?
|
|
|
|
|
Check if the following works:
CStringA str;<br />
str = "IP conneted";<br />
printf("%s", str);<br />
cout<< str;
|
|
|
|
|
CStringA?
Величие не Бога может быть недооценена.
|
|
|
|
|
Yes, for UNICODE settings CString get replaced to CStringW and for Multi-Byte it gets replaced to CStringA. You can check atlstr.h header.
|
|
|
|
|
Try it
...
#ifdef _UNICODE
wcout << LPCTSTR(str);
#else
cout << LPCTSTR(str);
#endif
virtual void BeHappy() = 0;
|
|
|
|
|
Probably it is a UNICODE issue.
Try changing
rrthangavel wrote: printf("%s",str);
with
printf("%S",str);
to check it.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hi all,
if I have BYTE bTemp = 0xAB;
I need the binary stream of this BYTE value(ie 010101011) in to an integer Array.
Is there any short way to do that rather to write the code to convert it?
Thanks
M Chauhan
|
|
|
|
|
use memcpy but be aware of data size types.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
I think you misunderstood the question. memcpy will not help the OP in this case!
|
|
|
|
|
Try it :
void TranslateBits(CArray<int>* pcArray, BYTE* pbyData, size_t cbDataSize)
{
if (pcArray && pbyData && cbDataSize) {
for (int i = 0; i < cbDataSize; i++) {
BYTE byData = pbyData[i];
for (int j = 0; j < 8; j++) {
int iBit = byData & 1;
byData >> 1;
pcArray->Add(iBit);
}
}
}
}
void Usage()
{
BYTE byData(0xAB);
CArray<int> cBitsArray;
TranslateBits(&cBitsArray, &byData, sizeof(byData));
}
virtual void BeHappy() = 0;
|
|
|
|
|
Hai,
I have a C++ dll,in which one of its function returns a pointer to the string array. How i can receive it in VB.
Thanks in Advance
|
|
|
|
|
c++ code:
__declspec(dllexport)BSTR WINAPI RetMsg(void)
{
wchar_t szMsg[] = L"Hello, world!";
BSTR pMsg = SysAllocStringLen(szMsg, wcslen(szMsg) + 1);
return pMsg;
}
__declspec(dllexport)ULONG WINAPI FreeMsg(BSTR pMsg)
{
return SysFreeString(pMsg);
}
VB code:
Private Declare Function RetMsg Lib "msg.dll" Alias "RetMsg" () As String
|
|
|
|
|
work with BSTR. Best is CComBSTR class, it help to ferget annoying stuff.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Good day Friends!
Here comes a new challenge!
Need to discuss whether it is right or what?
My problem is that the challenge sent by the server should be 8 bytes as i read from the documentation. As i decode the hash send by the server and Extract Challenge from it, it gives me only 7 characters including null character.
should i generate the response by using that 7 byte challenge or somewhere i am wrong.
is the challenge must be 8 bytes?
In short my question is:: can a challenge be less than 8 bytes?
|
|
|
|