|
hi,
my module is to send and receive a byte using rs232 with 8051 driver programming.in c
pls help
chels
|
|
|
|
|
BYTE bt_var;
bt_var = 0;
Now send it.
"Naked we come and bruised we go."
- James Douglas Morrison
Best Wishes,
ez_way
|
|
|
|
|
hai everybody,
I am a trainee, I am given a module to program lcd display Hitachi 44780 ,with 8051 micro processor,in c.can i know how to start with,and to proceeed,and any related websites for this lcd programming in match with my specification.plz help
chels
|
|
|
|
|
|
On Visual C++ 6.0, how to I identify a user who is having what kind of privileges? (i.e admin privilege, etc.
|
|
|
|
|
Use this Api to determine USER type
NetUserGetInfo(ServerName,UserName,UserInfo_1,bufptr);
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
In MFC how do you find the path that your application started in. ie you started it C:\Myapp\startedhere\
For example in VB its Path$ = App.path
Donald
|
|
|
|
|
TCHAR szAppPath[MAX_PATH];
::GetModuleFileName(AfxGetInstanceHandle(), szAppPath, MAX_PATH);
then use _splitpath to get the folder.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Alright here is the situation...I want to have an MFC image frame that when you drag a picture from a web site or hard drive onto the frame the program copies the image to a selected folder and displays the image in the frame. I found the option to accept files but i don't know what to do from there. Any assistance would be helpful. Thank You.
Never argue with an idiot because they will bring you down to their level and beat you with experience!!
|
|
|
|
|
BLIT it!
really serch for blit
Def: Blit: To copy a large array of bits from one part of a computer's memory to another part, particularly when the memory is being used to determine what is shown on a display screen. “The storage allocator picks through the table and copies the good parts up into high memory, and then blits it all back down again.” See bitblt, BLT, dd, cat, blast, snarf. More generally, to perform some operation (such as toggling) on a large array of bits while moving them.
Taken from:
http://catb.org/~esr/jargon/html/B/blit.html
"Naked we come and bruised we go."
- James Douglas Morrison
Best Wishes,
ez_way
|
|
|
|
|
In MFC how do you find the path that your application started in.
For example in VB its Path$ = App.path
Donald
|
|
|
|
|
I think These two Api Will help to do that
GetModuleFileName -->return the path of your application
_TSplitPath--> split the path acoording to your need
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
CString CGoodUtils::GetThisAppsName()
{
TCHAR szEXEPath[MAX_PATH];
GetModuleFileName ( NULL, szEXEPath, MAX_PATH );
return (CString)szEXEPath;
}
"Naked we come and bruised we go."
- James Douglas Morrison
Best Wishes,
ez_way
|
|
|
|
|
Please help me with this problem...
I'm trying to make a genetic algorithms inside a GUI with windows,
but I have some problems to make iteration with out let hanging off
the main program.
the structure of my iterations its like this
do{
select
crossover
mutation
.
.
.
}while(criterium its not met);
I was trying to do this loop with a tread and waiting for a event inside de
tread , but tread funtion makes that my main program crash
|
|
|
|
|
I want to talk to my mobile via inra red. I have found the project by Daniel Strigl that works under MFC, but I need to use it not under MFC. I can compile just useing windows.h, but it doesnt work, It keeps returning a file not found.
any ideas?
|
|
|
|
|
I have a text file which contains a list of sets of four floating point numbers. They are arranged like this, each * representing some number in the file:
* *
* *
* *
* *
.
.
.
and so on, but I don't know in advanced how many sets of four there are. I need to read them into a program using C++/VC++/MFC and I'm wondering if there is a "best" way to do it?
Currently I am using
<br />
while(fscanf(stream, "%lf %lf %lf %lf", a, a + 1, a + 2, a + 3) == 4)<br />
{...}<br />
where a is an array
double a[4]; .
I'm guessing this isn't a particularly good way to do it...
|
|
|
|
|
That's C. Read my iostream articles to see how it's done in C++
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Bring em in as a BYTE if possible. A WORD if not.
You can't do somthing faster than you can do nothing.
"Naked we come and bruised we go."
- James Douglas Morrison
Best Wishes,
ez_way
|
|
|
|
|
I have a static function and I want it to call a non-static function. The computer is telling me that I can not do this just by calling the non-static function outright.
Is there a way to call the nonstatic function from the static function?
|
|
|
|
|
Pass a pointer as a parameter of static function, call the non-static function by pointer.
|
|
|
|
|
If you need to, then the function should not be static.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
If it should not be static, so there are any problem.
You should modify your function, that can accept an argument (this pointer). So that, in the function, you can call none static function from this pointer.
For example:
class A{
static void Func(A* pA)
{
pA->NoneStaticFunc();
}
}
|
|
|
|
|
This is plain stupid. If you can only call a method when you have an instance of the class, the method should not be static. It in essence won't be static, it can only be called when you have an instance of the class to call it with, even if you don't call it from the class.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
No. I don't think so. According to C++ principle, static members should be shared with every instances of class. But in few case, we need an exception. C++ do not prevent me to implement such that. And here, the guy had a reason to have such case.
|
|
|
|
|
nguyenvhn wrote:
According to C++ principle, static members should be shared with every instances of class
Wrong - a static method is visible to anyone who can see the class scope, even if no instance exists. In C++, it's also visible from the instance scope, although in C# it is not.
nguyenvhn wrote:
But in few case, we need an exception. C++ do not prevent me to implement such that. And here, the guy had a reason to have such case.
We've not even seen his code, or know what he's trying to do. The fact remains, if you need an instance of the class to make the code work, if it needs to call a non static method, then either the other method should be static, or the other method has state, making this method also stateful, and also a method that should not be static.
If a method does not make sense to call when there's no instance of the class, it should not be static, simple as that. Your solution makes it seem static, but it's not, it can't be called without an instance. A design principle of C++ is to allow bad coding, and trust that coders will write good code, so they never have to fight the language. What you propose is possible, that doesn't make it good coding practice.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|