|
What type of control?
To prevent flicker, maybe look into NOT drawing the background behind the bitmap(s).
Mark
This episode brought to you by the number 5
|
|
|
|
|
int *buffer=new int[2000];
would it be so that memory of 2000 integers has been allocated and reserved?
or it is an array of 2000 integers type pointers.
if we want to dynamically allocate some memory i.e we dont know the array's size at compile time, and user decides to set a size at run time, what statement i should use???
|
|
|
|
|
MahaKh wrote: int *buffer=new int[2000];
A memory of 2000 integers has been allocated and reserved and the address of the array is stored in buffer.
MahaKh wrote: f we want to dynamically allocate some memory i.e we dont know the array's size at compile time
See Here[^]. You will get some idea on how to proceed.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi All,
I am working on a porting project.
I am unable to find oci.h file which my code looks for,
in my oracle client installation.
I searched for it everywhere.
How can i solve this problem?
vishu
Bangalore
|
|
|
|
|
|
does anyone know where the location of CDockState::SaveState(xxx) is in register key?
|
|
|
|
|
CWinApp::SetRegistryKey() determines where it goes.
Under that key will be an appname key.
Under that key will be keys specified in the lpszProfileName parameter of SaveState().
You can always step into the MFC code in the debugger and see the actual key strings.
Mark
This episode brought to you by the number 5
|
|
|
|
|
dear all
my prob:
how can i pass data in a file after reading the file in C.i want to encrypt data of this file after reading the file.i know i cn use f commands to read data but want to pass the data later in second part of my program.
sorry for any mystype..am typing with 1 eye.
\
plz advice
thanks
|
|
|
|
|
Please be more specific, write what you was able to do so far and what you're not able to accomplish.
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.
|
|
|
|
|
Hello
Thx for replying
My prob is that i have a file in notepad.I want to call that file in C.That i Know!But my prob is that i hv to use the data in this file for encryption.In fact i want to call a file so as to pass more data.I can read the data in the file but i want to use this data later in my program:i want to know th data_length.But here ion the code i have specified the num of char.But say i dont want to specify.I want my program to count the num of char in my file.Then i want it to encrypt the data.How can i pass those data.How can i store in it in an array.I cn printf the data..but i want to use the data.How can i use that.
FILE *fp;<br />
int noc;<br />
char test[80];<br />
<br />
char ch;<br />
fp = fopen("/TC/MODPROJ/PR1.TXT","r");<br />
<br />
while (1)<br />
{<br />
ch=fgetc(fp);<br />
if (ch==EOF)<br />
break;<br />
noc++;<br />
I am trying to encrypt using a key.The program is working fine when the data is within the code.But i want to call a file.
Please advice
Thanks
NB
|
|
|
|
|
I'm able to understand only a bit of what you wrote. I guess that you need to:
(1) open a text file
(2) Read the file content into a buffer
(3) Encrypt buffer content
(4) (Perhaps) Write the encrypted data to a new file
Now, waht are the steps you're able to do and, on the other hand, what are the problems you're unable to deal with?
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.
|
|
|
|
|
Your code snippet likely doesn't work because: 1) you are not initializing noc , and 2) you are doing nothing with ch . Try:
noc = 0;
while (1)
{
ch = fgetc(fp);
if (EOF == ch)
break;
test[noc] = ch;
noc++
} Make sense?
"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
|
|
|
|
|
Where exactly do we use function-style casts?
|
|
|
|
|
Regards,
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.
|
|
|
|
|
Or writing a book?
This episode brought to you by the number 5
|
|
|
|
|
Would you like to be a chief editor
|
|
|
|
|
As long as it doesn't require any actual work!
This episode brought to you by the number 5
|
|
|
|
|
check this[^]...
dumb boys never change i see...
|
|
|
|
|
toxcct wrote: dumb boys...
I see no reason to resort to name-calling. If you don't agree with his practices, simply press the "ignore" button.
"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
|
|
|
|
|
http://www.warpspeed.com.au/cgi-bin/inf2html.cmd?..%5Chtml%5Cbook%5CIBMVACPP%5CCPPLNG.INF+184
Though no example but made clear points of how function-style cast behaves in C++.
|
|
|
|
|
Hi : D.
I'm running XP SP2 and Visual C++ 6 SP 6. I'm very curious about why this behavior occurs. If I call this function while I'm debugging, it works!
ExitWindowsEx(EWX_POWEROFF, 0);
But if I run the debug-built or even release-built executables from my hard disk, it does't work! Why!? This is very strange. From the debbuger, the computer starts shut down procedure, but otherwise, no way.
Thank you...
|
|
|
|
|
Hm. Found my own answer in the meantime. Apparently, the VC++ IDE has administrator privileges. If you're a little program like me, check this out:
http://msdn2.microsoft.com/en-us/library/aa376868.aspx (see SE_SHUTDOWN_NAME)
http://msdn2.microsoft.com/en-us/library/aa375202.aspx
...and for a nice example...
http://msdn2.microsoft.com/en-us/library/aa376871.aspx
|
|
|
|
|
Privileges, mon ami, privileges (I suppose...)!
MSDN [^] states
To shut down or restart the system, the calling process must use the AdjustTokenPrivileges function to enable the SE_SHUTDOWN_NAME privilege. For more information, see Running with Special Privileges.
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.
|
|
|
|
|
We replied in the same time : D.
Thank you anyway! Appreciated.
|
|
|
|
|
You hadn't to read the OP.
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.
|
|
|
|