|
Hello
I installed 64 bit compiler but after that what I have to do to migrate 32 bit code to run on 64 bit operating System?
Yogesh
|
|
|
|
|
The dll must always be the same bits as the executable. If the executable is 32-bit then making the dll 64-bit is pointless, as it won't even load.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Ok,that Concept I understand.If executable is of 64 bit then its all libraries should be of 64 bit.And If those library also have some dependent library or dll that should also be 64 bit. Is it?
Thanks for your Help.
Regards
Yogesh
|
|
|
|
|
hi,
hw can i add msflexgrid headers dynamically?
|
|
|
|
|
I'm using the following code for Visual C++ 2008 to open the serial port and read lines output by a GPS. The received data is separated by comma's and I need to write only certain data, not the whole line.
I have a sense that I should be looking at the "Console::WriteLine(message);" code and doing something like WriteByte or StringBuilder or something. I haven't written code since 2003/4 and it seems to have change a whole lot since then.
Hopefully, I've explained my problem successfully (I can clarify, if needed). Any help anyone can provide would be great as I've been pulling my hair out for a few days.
Thanks.
#include "stdafx.h"
#using <System.dll>
using namespace System;
using namespace System::IO::Ports;
using namespace System::Threading;
public ref class PortChat
{
private:
static bool _continue;
static SerialPort^ _serialPort;
public:
static void Main()
{
String^ name;
String^ message;
StringComparer^ stringComparer = StringComparer::OrdinalIgnoreCase;
Thread^ readThread = gcnew Thread(gcnew ThreadStart(PortChat::Read));
_serialPort = gcnew SerialPort();
_serialPort->ReadTimeout = 500;
_serialPort->WriteTimeout = 500;
_serialPort->Open();
_continue = true;
readThread->Start();
Console::WriteLine("Type QUIT to exit");
while (_continue)
{
message = Console::ReadLine();
if (stringComparer->Equals("quit", message))
{
_continue = false;
}
else
{
_serialPort->WriteLine(
String::Format("<{0}>: {1}", name, message) );
}
}
readThread->Join();
_serialPort->Close();
}
static void Read()
{
while (_continue)
{
try
{
String^ message = _serialPort->ReadLine();
Console::WriteLine(message);
}
catch (TimeoutException ^) { }
}
}
};
int main()
{
PortChat::Main();
}
|
|
|
|
|
Use regular expressions or the Substring method of the string class to extract the fields you need from the string you read from the serial port.
|
|
|
|
|
|
Thanks for your quick replies. I will work on the solutions presented. The articles on writing GPS apps seems to be in visual basic, not c++, but I think I may be able to convert the code. As with most things, what seems to be easy is hard and hard is easy. Thanks. I'll post the completed code if I get it running.
|
|
|
|
|
All the best
|
|
|
|
|
Jimmie Sypolt wrote: I'm using the following code...
Which looks like Managed C++. Correct?
"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, how can I write the code for the constructor and destructor of this class
class ThreeD{
public:
ThreeD(int=5, int=5, int=5);
~ ThreeD( );
private:
int *** data;
int l, w, d; };
thank you
modified on Thursday, March 25, 2010 10:50 PM
|
|
|
|
|
Actually, I think the design of your class "ThreeD" is terrible.
If you are sure to implement it, the follow is for you.
class ThreeD
{
public:
ThreeD(int _l=5, int _w=5, int _d=5)
: l(_l), w(_w), d(_d)
{
data = new int**[l];
for (int i=0; i<l; ++i)
{
data[i] = new int*[w];
for (int j=0; j<w; ++j)
{
data[i][j] = new int[d];
memset(data[i][j], 0, d*sizeof(int));
}
}
}
~ThreeD()
{
for (int i=0; i<l; ++i)
{
for (int j=0; j<w; ++j)
{
delete [] (data[i][j]);
}
delete [] (data[i]);
}
delete [] data;
}
private:
int*** data;
int l, w, d;
};
|
|
|
|
|
zakria81 wrote: Hi, how can I write the code for the constructor and destructor of this class
Your question is vague at best. Given what little you've provided, you can implement them any way you wish. Have a look at the "How to ask a question" thread on the first page of this forum.
"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
|
|
|
|
|
I'm almost brand new to C++ so I'm hoping someone can help me out. I'm creating a Windows Form application, and I want to display the current time in place of some static text I was using as one of my Label controls. I've spent some time poking around and I think I'm missing something basic.
I was trying something like this:
this->label1->Text = System::DateTime::Now;
and something a little more complexe like this:
this->label1->Text = (System::DateTime::Now.ToString("T"));
But no matter how I manipulate the line, either the code editor or the design editor within Visual Basic Studio barks at me.
So can someone help me out here and let me know what I'm missing? My goal is to just have something like "5:11:45 PM" show as my Label control when the form is displayed.
Thanks!
|
|
|
|
|
Doesn't a label control have member Caption rather than Text ?
|
|
|
|
|
I believe the original post is using Windows Forms in which the label control has Text property instead of Caption property.
|
|
|
|
|
Hi Lucidation,
I think, u are now in the wrong place.
|
|
|
|
|
You mentioned "Visual Basic Studio", but your code seems to be C++.
What was the message that the "code editor" or the "design editor" showed? Please provide the message here so we can have a better understanding of the problem.
|
|
|
|
|
ask this question in Managed C++/CLI forums
|
|
|
|
|
I posted my question in the other forum (adding some additional info as suggested). Thanks!
|
|
|
|
|
Sqlcmd isn't available. MFC application.
The user tells the application that the server he wants to install the database and tables are on a different machine. So I have a script which I could load into memory and run. It would be nice to call sqlcmd -S ... -i filename however it isn't available.
Any thoughts??
Thanks!
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
Are you using a DSN? I know those can refer to remote machines.
"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
|
|
|
|
|
It's a DSNless connection.
I'm thinking of installing sqlcmd on the users machine. Just seems like overkill! Wish CDatabase::ExecuteSQL handled a file.
Thanks,
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
I am trying to create an ActiveX control that contains another ActiveX control. I have succeeded up to the point where the included control is displayed on my control when I put my control onto a test project's dialog box.
The contained control is an element of a property page. I wanted to add a variable to the property page so that I could manipulate the contained control. (To start, I wanted to resize it when the container is resized.) I have another control developed in Visual C++ 6.0 that contains the same control that my new project is trying to contain. In VC6, when I created a variable for the contained control, the Class Wizard recognized that the contained control needed a large number of interfaces and classes, and it created a hundred or so files to define them. But in VS 2008, when I tried to add a variable to refer to my contained control, I got a single class definition for my control, but none of the interfaces or classes that control needs. Why not? What do I have to do to get VS 2008 to build the complete control and everything it needs?
As a simpler test, I created a dialog-based MFC application project and put my contained control directly onto its dialog. When I right-clicked on the control and selected Add Variable, I noticed that the drop-down list contained all of the interfaces that the contained control would need. But I selected the top entry in the list, which was "control". After clicking OK, VS 2008 generated a single class for me, named CActiveGanttVCCtrl1. I tried building the project and got a large number of errors. The file ActiveGanttVCCtrl1.h contained the following:
IclsTasks * GetTasks()
{
IclsTasks * result;
GetProperty(0x1, VT_DISPATCH, (void*)&result);
return result;
}
void SetTasks(IclsTasks * propVal)
{
SetProperty(0x1, VT_DISPATCH, propVal);
}
The compiler claims that the IclsTasks interface (and many others) is not defined. Yes, that's true. VS 2008 didn't automatically generate it. Why not? What do I have to do to get it to be generated for me?
Thank you very much!
RobR
|
|
|
|
|
Hello,
Is there any way of tracking what elements were moved where during a vector sort?
Thanks,
|
|
|
|