|
hi all,
Can you give me a simple callback function
example in C++?
|
|
|
|
|
I believe Google[^] has everything you need...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
A real world example is the TIMERPROC function (documentation, code sample).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
LRESULT WINAPI CALLBACK WinProc(HWND, UINT, WPARAM, LPARAM);
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Hi All
I am trying to open Excel file(2003 & 2007).I know to open excel file to use
MSO.DLL,VBE6EXT.OLB,EXCEL.EXE this.But i want to know there is any different method to open excel file.Please help me.
|
|
|
|
|
You may approach the hard disk with a big hammer, for instance.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What do you mean?
modified on Thursday, April 15, 2010 4:22 AM
|
|
|
|
|
MsmVc wrote: what do you min?
Actually I max.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hmmmm - you're probably approaching this in the wrong way...
If you want to open the spreadsheet so the user can edit it, use the <code>ShellExecute</code>[^] Win32 function.
If you want to open the spreadsheet to modify it programmatically, I'd suggest using Automation. That opens the spreadsheet in Excel and then you modify it by asking Excel to perform functions on it. There are several[^] articles[^] on CodeProject[^] that cover the subject. Try reading and understanding some of those...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
Write a function to check that a given string is a valid IP address. An IP address is of the form a.b.c.d where a,b,c,d are numbers in the range 0-255 without a leading zero. You are not allowed to use any string methods like split, indexof, parseInt etc, in C language
|
|
|
|
|
its actually quite easy, but :-
1) sounds like homework - DO YOUR OWN
2) I dont like 'Please give the correct ans' - people here give the best answer they know according to their experience & knowledge, and dont mislead/give deliberatly wrong answers, so I take offence to this
'g'
|
|
|
|
|
In C language there is nothing like IndexOF,ParseInt and splits..
you can use strstr to find '.' and atoi to convert strings to number
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
#include <regex.hpp>
int match(const char * what)
{
return(regex_match(what,"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$")
}
That should impress your teacher...
|
|
|
|
|
The correct way to check IP4 addresses for validity is:
bool validate_addr(const char* ip)
{
return inet_addr(ip) != INADDR_NONE;
}
|
|
|
|
|
Yes, but it does not follow the requirements. inet_addr will accept any dot notation, so "4.003.002.0x10" will be valid. I think the purpose of the exercise is to lead gently to stuff like atoi(), format strings, and so on...
|
|
|
|
|
I agree on your answer - clever
|
|
|
|
|
|
Characterize and compare the performance of file I/O by implementing reading and writing of files through the following three methods:
· I/O through system calls read and write
· Memory mapped I/O through mmap
· Buffered I/O through read and write
You should implement a program that can either read or write blocks of a given size from a large file. The user should be able to specify the I/O method to use for reading and writing. For example, writing blocks of 1K through system calls (the first method above) may be done as follows:
iotest --method=syscall --blocksize=1024 --operation=write
Use your program to measure the read and write I/O performance achieved through the three methods for various block sizes. What can you deduce from your observations?
|
|
|
|
|
Happy to learn about your school assignment. Now get on with it...
|
|
|
|
|
Sorry my MIND is still searching for answer.. i think i have to fit google in my mind to search faster
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
That's the second site I've read that question on tonight.
|
|
|
|
|
|
javster87 wrote: Use your program to...
The operative word is YOUR.
"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
|
|
|
|
|
Hello,
i need help with some C code.
lets say i have an array ..for example {1,3,2,5,10,11,8,7,9}
i need find the the largest part that gives me A[i] < A[i+1] < A[i+2]..
in this case its {2,5,10,11)
and the algorithm should return me the j that started this series of number (j=2)
what should i do?
i'd be glad if anyone can help me reaching the answer.
|
|
|
|