|
Getting closer... Now no errors but it displays a sequence of 31 ===============================
whereas the key value is a hexadecimal number. Also tried to change the value to decimal numbers but it display the same sequence. Unsolvable mysteries of the registry keys....
|
|
|
|
|
Try changing lpcdData to a larger value. Or just change it back to 64, which is what you started with.
|
|
|
|
|
Nope. Changing the value slighlty outputs the same weird = signs. Increasing the value to 64 triggers a breakpoint in the executable. Arghhhhh!
|
|
|
|
|
No luck. I always get an error. I am starting wondering whether the fact that it is not working on my pc is becasue me and you are using different compilers... I am using Visual Studio 2005. Could that be the reason?
|
|
|
|
|
Well, I'm using Visual Studio 6.0. Isn't that older than 2005? I assume that all the functions in VC++ 6.0 would be incorporated into VC++ 2005...Is there any place where you can get a trial version of 2005?
|
|
|
|
|
How to initialize a string.. so that it can hold any size..
char str[100] i dont want to do this way...str[] should be able to support as many characters as input by user..
|
|
|
|
|
Use a std::string instead (from the Standard Template Library).
|
|
|
|
|
are you coding in C or C++ ?
|
|
|
|
|
i m coding in C..so cannot use STL.
|
|
|
|
|
document yourself about linked lists. they can be performed using C structures, and a set of pointers...
otherwise, you have to allocate/reallocate/free blocks of memory as you need...
|
|
|
|
|
You can use pointers if you know that.
|
|
|
|
|
Ask user approx how many char(s) his string will be. the allocate memory to a char pointer with the size specified.
char * str;
str = (char *)malloc(size);
|
|
|
|
|
Can we do it without asking the user??? Is any other Way?
|
|
|
|
|
uhhh, where is the user asked ? your program allocates memory without asking AFAIK !
|
|
|
|
|
dona jain wrote: Is any other Way?
What are you trying to achieve?
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
char str[100]
i dont want it this way ..i want that all the characters which a user give i/p can be allocated memory...that means we dont know yhe exact array size
|
|
|
|
|
Do you get them blockwise or char by char?
For blocks, a linked list of blocksized buffers would be the way to go.
For single chars, you could assemble blocks by yourself (get chars until you have, say, 512 and then add this buffer to your linked list and make a new buffer of size 512).
Note that there must be any amount of ready-made solutions for that on *specialized C-Programming pages*. Not in the C++/MFC forum of Codeproject.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
dona jain wrote: Can we do it without asking the user??? Is any other Way?
Yes. Assign each character that the user types to a char variable. Dynamically grow an array and append the char to it each time. Note that this reeks of inefficiency.
Why don't you tell us what you are ultimately trying to achieve so that we may possibly offer a better solution?
"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
|
|
|
|
|
hi masters
i have made an application in vc++ using dialog based
i have a button so i want when i click this it ask for some system ip address
and when i enter ip address and click then it connect to that system
and a window appwar for chat between those two systems
please guide me
thanks
|
|
|
|
|
p_ wrote: urgent please
What do you think where you are here?
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
sorry for that
i think my view goes in wrong direction
|
|
|
|
|
|
thanks for this sir
but i want it through coding in vc++
thanks
|
|
|
|
|
hye,
i m also looking for this topic...
can u send me ur project.
my id is gemini_5jun@yahoo.com
|
|
|
|
|
i am sorry becoz my project is not complete
and i am working on it
i have only forms and login coding for user
|
|
|
|