|
|
What do you mean exactly ? Could you provide some code snippet ?
|
|
|
|
|
Hi!
I've one string array.It's declared as follows:
irr::core::array<irr::core::stringc> result;
Here is my Structure:
struct playerData
{
int id,matches,innings,notouts,runs,highest,hundred,fifty,catches,strikerate,balls,runs_given,wickets,fivewkt;
char bestbowling[32];
};
I've to Copy the Array elements to Structure elements. How to do this?
|
|
|
|
|
You will need to assign each member individually (I guess you want to store each string in the id, matches, innings, ... mebers). Furthermore, you have to convert your different string to integer.
|
|
|
|
|
I think you are underestimating the power of your brain. You will learn more if you figure out things like that for yourself.
struct
{
int a;
} s;
int arr[10];
s.a = arr[0];
|
|
|
|
|
Hi sir,
I have deleloped one dialog based application,where
I will enter username and password
and i have a created a button(Save).
my plan is when i click the button i wnat it to save it in a database.
I have created a database
I have used this steps
In SQL Server Enterprise MAnager
I have created a new database as "Sample"
and also created a new table there and two columns as "Name" and Password.
Now i am not getting how can i connect to database
I am totally struct and messing around,please give me any idea how can i process.
Thanks
Raj
|
|
|
|
|
|
if your's application is MFC based application, CDatabase class is there for manipulate database. If you wanna manipulate your database, you should make following steps..
1. Build ODBC connection string for SQL server for this refer to connectionstring.com
2. Create object for CDatabase
3. Using CDatabase::Open() function get connection to your database
4. Using CDatabase::ExecteSQL() run your insert query..
5. Finally close the connection CDatabase::Close()..
-suzuu
|
|
|
|
|
Hi all,
I am trying to communicate with HID Devices, but my problem is my ReadFile function always return zero.
I have written the code below
ReadHandle=CreateFile
(detailData->DevicePath,
GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
(LPSECURITY_ATTRIBUTES)NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL);
Result = ReadFile
(ReadHandle,
InputReport,
Capabilities.InputReportByteLength,
&NumberOfBytesRead,
(LPOVERLAPPED) &HIDOverlapped);
Before CreateFile i have used all the necessary api's to get the DevicePath value like SetupDiGetDeviceInterfaceDetail
Now, i am not getting that where is the problem.
Thanks in advance
|
|
|
|
|
From the documentation[^]:
If the function fails, or is completing asynchronously, the return value is zero (FALSE). To get extended error information, call the GetLastError function.
Note The GetLastError code ERROR_IO_PENDING is not a failure; it designates the read operation is pending completion asynchronously. For more information, see Remarks.
You are creating your ReadHandle with FILE_FLAG_OVERLAPPED , if you check GetLastError() after ReadFile , do you maybe get ERROR_IO_PENDING ?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Hi,
I have to find the status for a particular file which is currently copying some where or not? If anybody know any DOS commands or have any idea regarding this, please let me know.
Thanks in advance
Suzu
modified on Thursday, July 8, 2010 3:03 AM
|
|
|
|
|
Jack Torrance: | "When" do you think "maybe" he should be taken to a doctor? | Wendy Torrance: | As soon as possible. | Jack Torrance: | [mocking/imitating her] As soon as possible. |
PS: You removing the "ASAP" kind of spoilt the joke!
Steve
modified on Thursday, July 8, 2010 3:06 AM
|
|
|
|
|
|
meaooo...
|
|
|
|
|
Why do you want to know that? What for?
|
|
|
|
|
just i want to monitor particular file in windows...
|
|
|
|
|
So have you considered ReadDirectoryChangesW() or FindFirstChangeNotification() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi all,
Im having
char *data = new char[256];
if i use cstring like,
std::string logFolder;
CString temp1;
temp1.Format(L"%s",data);
USES_CONVERSION;
logFolder = T2A(temp1);
I am able to get the correct path from data.
If i use like,
std::string temp;
temp = (boost::format("%s") % data).str();
logFolder = temp;
i cant get the correct string from data..
Anyone knows how to format the char array?Is parsing needed?Pls help me.
Thanx..
|
|
|
|
|
Try boost::format("%1%") % data
|
|
|
|
|
Not working.Its also gives the first letter only..
Is any other syntax to display the char array in boost format??
Pls help me.
|
|
|
|
|
Oh! Yes of course.
You wchar_t instead of char .
|
|
|
|
|
It does not give the correct value..It gives some abnormal value.
|
|
|
|
|
This code works fine for me:
#include "stdafx.h"
#include <tchar.h>
#include <iostream>
#include <boost/format.hpp>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
using namespace boost;
const char *pData = "world";
format fmt("Hello %1%!");
fmt % pData;
cout << fmt;
cout << endl;
return 0;
}
The output is:
Hello world!
Steve
|
|
|
|
|
Stephen Hewitt wrote: The output is:
Hello world!
and there it is. You dropped the bomb...
|
|
|
|
|
I have created a list box using my own class derived from CListBox. I want to disapear it from the dialog if anyone is clicking outside that listbox. very similar to combobox.
Please help me to do that.. It will be fine if provide some sample code.
Thanks
|
|
|
|