|
if u r using MFC libraby, u can do this using
char * pName = new char[5];
strcpy(pName,"test");
CString strText(pName);
u can do different conversion using CString e.g: LPSTR, LPCTSTR, LPWSTR
LPWSTR pWstr = (LPWSTR)strText;
SaRath
"D on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!"
|
|
|
|
|
I am having a VC++/MFC application it is receiving 10,000 paramaters per second (4 bytes per paramater)
from remote side.I want to insert this data into Oracle server using
ODBC .But any database is having maximum fieldsize of 8000 chars or Maximum 1000
field in one table.
So how do I insert this type of data into oracle or MS SQL server.
I want to retrive this data for further stasstics.Please help
Thanks in Advance
-- modified at 8:01 Tuesday 30th May, 2006
|
|
|
|
|
Assuming that you mean the remote side is sending you 40,000 bytes of data per second, and you want to store that data as a distinct row, then you probably need what's known as a BLOB field (Binary Long OBject). If memory serves, then you can only have one of these per row.
Steve S
Developer for hire
|
|
|
|
|
How to find the number of lines compiled in C/C++?
Its expected to write/display the numper of line compiled in some std output device or a file at the end of compilation.
Is there any compiler option for it?
Balachander.P
|
|
|
|
|
|
Project Line Counter[^] is a powerful open source visual studio add-in.
it's main advantage is that it doesn't count the written code line but the generated code lines...
for instance
printf("Hello World");
and
printf(
"Hello "
"World");
produces the same number of code lines...
they also provide they sources[^] on codeproject...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
<br />
#include<stdio.h><br />
<br />
typedef struct A<br />
{<br />
int a;<br />
char c;<br />
}A;<br />
<br />
typedef struct B:A<br />
{<br />
int bb;<br />
}B;<br />
<br />
int main()<br />
{<br />
printf("%d",sizeof(A),sizeof(B));<br />
}
Hi frends, I tried the above program.
Can any of u tell me the reason y it is not working??
It is simply a C program..
How can v support Inheritance in C??
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
|
<br />
typedef struct A<br />
{<br />
int a;<br />
char c;<br />
}A;<br />
<br />
typedef struct B:A<br />
{<br />
int bb;<br />
}B;<br />
<br />
int main()<br />
{<br />
printf("%d%d",sizeof(A),sizeof(B));
}
and the output as:
8 12
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
toxcct wrote: this is certainly not C !!!
How true....
It's supposed to be hard, otherwise anybody could do it!
Regarding CodeProject: "resistance is pointless; you will be assimilated"
|
|
|
|
|
|
|
Thanks buddies,
When i ran the above as .c ,I got the error C2059: syntax error : ':' ,
But when i ran the above file as .cpp, still i am getting the same error, what is wrong in it??
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Even if i save the file as.cpp and run the program i am getting the error C2059: syntax error : ':'
Why so ??
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
did you ever see in stroustrup's works a struct (or a union - it's exactly the same problem here) inheriting something else (struct, union or class) ????
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Hi!
I am new to this group. I have started working on windows mobile 5.0 for Pocket PC recently. For my application on it I have been using Visual C++ (Not Embedded VC++). While creating the project I was in a confusion of which template I need to select under "File"----> "New"----->"Project------->""Visual C++"---------> "Smart Device"-------------->- ----------->ATL smart device project,
------------>MFC Smart Device application
------------>WIN32 Smart device project
------------->MFC smart device active x control
-------------->MFC smart device DLL
I am completely new to this environment. I wanted to know how to create this project and how to start working on it. Are there any good sites from where I can get the complete information? Please revert if any one have information about all these things. Waiting for your responses.
Regards,
Ravi
|
|
|
|
|
There was a question from a reader in this forum, regarding wrapping the text in teh tooltip control. All you need to do is to set the tip width using SetMaxTipWidth function. CToolTipCtrl will wrap remaining text to next line bu automatically adjusting its height.
see the sample snippet
m_ToolTip.Create(this,0x40);
TOOLINFO ti;
ti.cbSize = sizeof(TOOLINFO);
ti.lpszText = "1. This is Item1\r\n2. This is Item1\r\n3. This is Item1";
ti.hinst = AfxGetInstanceHandle();
ti.hwnd = pWnd->GetSafeHwnd();
ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND | TTF_TRANSPARENT ;
ti.uId = (UINT) pWnd->m_hWnd;
m_ToolTip.SendMessage(TTM_ADDTOOL, 0, (LPARAM) &ti);
m_ToolTip.SetDelayTime(2000,200);
m_ToolTip.SetTipBkColor(RGB(0xFF,0,0));
m_ToolTip.SetTipTextColor(RGB(0xFF,0xFF,0xFF));
// just for more accuracy
CDC* pDC = GetDC();
m_ToolTip.SetMaxTipWidth(pDC->GetTextExtent("1. This is Item1").cx);
SaRath
"D on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!" /
-- modified at 7:36 Tuesday 30th May, 2006
|
|
|
|
|
Gud work.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Hi,
I am a VC++ Developer.I am facing problem to hook the api function Createfile,deletefile.
Actually i want to see a own message box when some file(exe,dll etc) not folder are created and deleted. plz help me to solve this problem.
|
|
|
|
|
Hi,
I'm trying to add resizing to a CFormView in an MDI app, using the ResizableLib from the articles here on CodeProject. Everything works fine, except for ActiveX controls - I can't get a hWnd for an activex control when it's on a CFormView. Everything works fine with the same control(s) on a CDialog.
Can anyone tell me how to obtain the hWnd for an ActiveX control on a CFormView?
(It's an MDI app in VS .NET 2003)
Thanks,
Geoff.
|
|
|
|
|
Hi everybody
Is there anyone who knows a good book or website with tutorial on using ADO
with C++. I need to understand the syntax, smart pointers, COM objects not just copy paste some code. Pls help me i've been searching for a week now for some good reference but onlything i found are same sample codes with no comments.
I really need to understand how to use ADO and start my project. Thenks a lot
|
|
|
|
|
|
Thanks NiceNaidu appreciate the help
i've read the article is very helpfull
if you have anything else in mind pls let me know
thanks again
|
|
|
|
|