|
WhiteSky wrote: See An effective way to hide or show columns in list control dynamically[^] does any help?
Sure, assuming that rows are synonymous with columns.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Is a function operator different from a functor?
|
|
|
|
|
that depends on who you're talking to.
|
|
|
|
|
I have come to know that many of US universities upload their video lectures on web servers. Do people here know of such sites?
|
|
|
|
|
The ones I know of only let you view if you are a student and require a login/password.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
I have write a program for transmitting data to the EEPROM of my µC. I have a problem. The µC recieve only a few data and not all of em. The bauterate is setting by 9600 for µC and COM port. Wat I'm doing rong ?.
|
|
|
|
|
First, you need to make sure that the other communication parameters match as well. In addition to baud rate there's word size (5-8 bits per character), and parity (none, odd, or even).
Secondly, RS-232 defines a number of methods of doing flow control. This is a protocol for guaranteeing that the receiver has processed a character before the transmitter sends the next one. There are hardware and software protocols. The hardware protocols manipulate the 'modem' control lines to signal when the receiver is ready. The software protocols send specific characters from the receiver to the transmitter to start/stop the flow of data.
Software Zen: delete this;
|
|
|
|
|
Thanks, I try the software flow control now.
Jelle.
|
|
|
|
|
can a CHAR data type accept alphanumeric string? Practically this happens with my program? Please help is it is possible
|
|
|
|
|
A CHAR is a single character, therefore it cannot accept a string.
|
|
|
|
|
But CHAR arrays can.
CHAR MyArray[] = "Hello world";
CHAR* p = "Hello again";
Maxwell Chen
|
|
|
|
|
No it cant.Can you more explain about your program?
|
|
|
|
|
Hello gurus,
I have some linking problem with Visual Studio 2005 installed on an Windows XP Professional x64 Edition with Platform SDK for Windows Server 2003 R2 (march 2006).
I have the following linking errors:
1>xxx.obj : error LNK2019: unresolved external symbol __imp__wstat64i32 referenced in function xxx
1>xxx.obj : error LNK2019: unresolved external symbol __imp__stat64i32 referenced in function xxx
1>xxx.obj : error LNK2019: unresolved external symbol __imp__wfindfirst64i32 referenced in function xxx
1>xxx.obj : error LNK2019: unresolved external symbol __imp__findfirst64i32 referenced in function xxx
1>xxx.obj : error LNK2019: unresolved external symbol __imp__wfindnext64i32 referenced in function xxx
1>xxx.obj : error LNK2019: unresolved external symbol __imp__findnext64i32 referenced in function xxx
I can see these unresolved references are declared in stat.h (_stat) and io.h (findfirst/findnext) and should be linked with the CRT but I don't find the correct lib to link with.
Does any body has a clue to solve this problem?
Best regards.
Fred.
There is no spoon.
|
|
|
|
|
Not sure, but it seems a mismatch between the compiler and linker configurations, like compiling for Win64, but linking for Win32.
Can you check the compiler and linker flags ?
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Hello All,
I see some code that looks like this:
string ClassA::operator()(int size1, int size2)
{
....Some function implementation....
}
This appears to me to overload the () operator. Why would someone do this? My understanding of operator overloading is to make code more readable such as with the + and comparison operators.
I would think the implementation for this overloaded operator would be called by:
ClassA c = new ClassA();
string s = c(10, 20);
So, what is the purpose of oerloading the () operator and am I approaching finding where it is called in the code correctly?
Thanks for any help.
Thanks.
|
|
|
|
|
That's a function call operator.
Why? To make the code less readable, of course
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I don't see any need of irony for a perfectly legitimate question,
nor I see any need of such an arrogant answer.
See the next post
[^]
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
No irony and certainly not anywhere close to the amount of arrogance that seems to
be in your post. Are you the posting police?
Actually I was agreeing with the OP.
I rarely see use of this that doesn't make the code harder to read than it would
be if a meaningful-named method was used.
Every time this comes up (function call operator) I'm reminded how lame the
example is in the Visual C++ documentation:
"Given an appropriate overloaded function-call operator, however, this syntax
can be used to offset the x coordinate 3 units and the y
coordinate 2 units. The following code shows such a definition:"
<pre>
class Point
{
public:
Point() { _x = _y = 0; }
Point &operator()( int dx, int dy )
{ _x += dx; _y += dy; return *this; }
private:
int _x, _y;
};
int main()
{
Point pt;
pt( 3, 2 );
}
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Every time this comes up (function call operator) I'm reminded how lame the
example is in the Visual C++ documentation:
That one is lame, but there are others that are not[^].
|
|
|
|
|
Indeed.
Thanks much for the link (and the wiki link) Seriously.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Thanks much for the link (and the wiki link) Seriously.
You're welcome. In this profession, we all learn all the time, and that's one thing I love about it
|
|
|
|
|
I agree. Geez, if I didn't learn anything than hanging out at this site would be a complete
waste of time
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Are you the posting police?
Not at all. Just wanted to know the reasons of such a "taliban" position. Now I know.
Like many MS MVP you're convinced MS documentations about languages is the Bible.
I'm not. I consideri it as just one (of many) sources of information. And Nemania explained what it is for.
Now, is your good example of A (better ONE) bad use, enough to say "never use" without any explanation about?
I think no, but I couldn't say it, until you didn't provide any motivation about.
Of course, fell free to sustain your position, but let every one else to know.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
emilio_grv wrote: Like many MS MVP you're convinced MS documentations about languages is the Bible.
Where did you get that from? You seem to have implied a lot of things from one line of tongue-in-cheek
text that wasn't even directed to you.
If I didn't post enough information or provide any help to you or the OP then simply ignore my post. I'm
pretty sure all of us who read here do the same.
If everyone starts pulling apart useless and bad posts here (and there are LOTS of them, every day),
the forums will degenerate pretty quickly.
If you knew the slightest thing about me, you'd know that me being an MS MVP is the real irony.
I was dragged into using MS dev tools, kicking and screaming. I had no choice. I still have no choice.
It's market and customer demand. I do have a choice to not make money but I'm not choosing that yet.
Until then, I will make the best of what I have to use, including whatever MS is kind enough to give me.
And arrogance? Give me a break. I have never claimed to know everything, and have repeatedly stated I know
next to nothing. I'm here on this site to learn and no other reason. I figure with 4 million+ users potentially
able to contribute to a thread, I'm going to pick up some knowledge, and I do. If that stops, I will move on.
Cheers
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I actually use this all the time, in the XTrace.h file I include with some of my projects. I got the idea from this article. Very useful.
|
|
|
|