|
do you dialog modeless then...
|
|
|
|
|
|
Sir,
I want to apply password to the file/folder with the help of my application .Please suggest some tutorials for that.Last time i was told to get the knowledge up to black belt, device drivers, file extentions.But i was not suggested where to study these things online.Please suggest any online link .I want to start from the scratch.
Thanks
|
|
|
|
|
|
hi all,
I need to hide/show menus instead of just disable/enable them when UpdateCmdUI is called... how???
Thanx
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
You'll need to call CMenu::RemoveMenu and CMenu::InsertMenuItem to physically remove and restore them. There are no hide / show options.
|
|
|
|
|
Im not sure its possible or no but if you have a custom menu you can use of drawitem when it want to shows items.
|
|
|
|
|
Hi,
Im trying to get this output in the console:
*
**
***
****
*****
******
*******
********
*********
**********
***********
With a genest loop.
How do i get those spaces?
I tried the ascii char '32', but that didn't work either.
Anyone any suggestion?
Thanks in advance!
Edit: its a triangle which is outlined to the right. Its not displayed correctly!
|
|
|
|
|
strange,
(char)32 or char(32) or you can use (' ') to write a space...
all should work
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Hi Mohammed,
Thanks for your reply.
I was kinda wondering how i can increase and decrease the spaces in a geneste for loop.
Do you know how i can do that?
|
|
|
|
|
I dont know what 'genest' mean - not even in the dictionary, so I assume it to mean 'nested loop', if this is true, then here is the code:
<br />
#include <iostream.h><br />
<br />
void main()<br />
{<br />
for (int i=0;i<10;i++)
{<br />
for(int j=0;j<5-i/2;j++)
cout<<' ';<br />
for(int k=0;k<i;k++)
cout<<'*';<br />
for(j=0;j<5-i/2;j++)
cout<<' ';<br />
cout<<endl;<br />
<br />
}<br />
}
hope this helps
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
how do you display your spaces ??
don't printf(" "); do that correctly ?
|
|
|
|
|
#include <iostream>
#include <algorithm>
#include <iterator>
using namespace std;
char diagram[][12] = { " *",
" **",
" ***",
" ****",
" *****",
" ******",
" *******",
" ********",
" *********",
" **********",
"***********" };
int main()
{
copy(diagram, diagram + 11, ostream_iterator<char*>(cout, "\n"));
}
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi Zac,
Thank you for your reply.
Isnt this possible to do this with 2/3 for loops?
|
|
|
|
|
Yustme wrote: Isnt this possible to do this with 2/3 for loops?
Possible? Yes. You can actually do it in 1 loop. I hardcoded the string for simplicity, but you can have that generated as well as print it to the screen all in 1 loop. However, there is no need to do so when you can use STL's built in algorithms to do it for you. Why write 15+ lines of code when 1 will suffice?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi Zac,
This is an assignment of a book. Im learning C++ now and they are not that far yet.
Its chapter 3. All assignments are about loops, for loops in particular.
Thats why i wanna do this with a for statement.
|
|
|
|
|
Assuming you want to generate the strings as well as write them, you will do this then:
const unsigned int TRIANGLE_HEIGHT = 11;
for (int i = 0; i < TRIANGLE_HEIGHT; ++i)
{
for (int j = 0; j < TRIANGLE_HEIGHT; ++j)
{
if (j >= TRIANGLE_HEIGHT - i)
cout << '*';
else
cout << ' ';
}
cout << endl;
}
cout << endl;
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Yustme wrote: With a genest loop.
What kind of loop is this?
Yustme wrote: How do i get those spaces?
By using the spacebar, or ASCII 32. But since you did not show the code that is not working, we can't be of much help.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi David,
Here:
for( int k = 11; k > 1; k-- )
{
for( int g = 1; g < k; g++ )
{
cout << '*' ;
}
cout << endl;
}
|
|
|
|
|
So how are you expecting it to work with no cout << ' ' statement? What you've shown is just going to print asterisks.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Please anybody help me out ...... I have a rgb format video.. Its the collection of some frames. Now if I want to capture these frames one by one and display them at a particular frame rate, what should I do ??? Please help me out...
|
|
|
|
|
Look through codeproject articles / Multimedia.
If I remember correctly (which means "you go and have a look, don't expect others to do everything for you") there is at least one which deals with extracting frames from a video file. It may save them as separate bitmap images or something, but it makes a good starting point.
|
|
|
|
|
Hi, I am writing a C++ program. I have found out that an unhandled exception message will pop out whenever the code enters a function.
I have used breakpoints and cout statements to determine the point of the crash.
The function has 4 parameters. 1 int variable, 1 int array and 2 double arrays. "Tuples" and "Features" are constants representing values of 1600 and 46 respectively.
int rank(int num,int data[Tuples][Features],
double dist[Tuples],double rank[Tuples])
{ ..........
...........}
The program crashes after the first opening bracket. '{'. None of the statements inside the function are executed.
I don't know what is going on. How come the program will crash without even executing a statement?
|
|
|
|
|
How are you calling this function?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
First, your crash is probably because your function is using too much stack memory. Too many local variables in the stack (or very large arrays on the stack).
Second, you may want to reconsider using multi-dimensional arrays.
|
|
|
|