|
john john mackey
I saw your answer in codeproject but i'm sorry i dont know address
|
|
|
|
|
That's "compound document" information. See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Thanks! I want to stuff info into these fields that I would otherwise have to extract in the "data" files I create. With these props set, I can just "mouse-over" a file listing in (File) Explorer and get a quick summary.
Johnny
|
|
|
|
|
I saw such c codes:
struct A {
...
}
int fun(long x)
{
...
A z=(struct A *)&fun;
...
}
How to explain that? can anybody help?
Thanks!
|
|
|
|
|
Declare a variable z of type A which takes the value of the address of the function fun .
The tigress is here
-- modified at 18:36 Thursday 27th April, 2006
|
|
|
|
|
It could be code which accesses the machine code of the function fun at runtime. What was the contents of the structure?
Steve
|
|
|
|
|
The struct is just as following:
Struct Node {
int x;
Struct *Node;
}
|
|
|
|
|
|
|
Not digestible with my Visual C++ 2003.
error C2440: 'type cast' : cannot convert from 'int (*)(long)' to 'A *'
Maxwell Chen
|
|
|
|
|
Hi all,
I have an array of pixeles:
UINT * ptPixels;
I want to send the values in this array using CSocket.
Then use StretchDIBits API.
How can I do that?(Converting values correctly)
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
Correct. socket remotely
Kuphryn
|
|
|
|
|
What does it mean?
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
hi to all
1.what is purpose of a member function
that is in the protected in the class defenion
what his abilities ,and what is the difrence if it is in the public ?
2.what is the difrence between protected and privete ?
thanks in advance :->
mayer
|
|
|
|
|
|
im developing an application where i have to use the volume down and up keys. but i cant handle these keys in my code. I mean i want to change their defautl action. Im using NO MFC c++.
Can somebody help me with this?
thnks a lot
Galvanoski
|
|
|
|
|
Not sure about Win CE (I'm guessing PPC means pocket PC) but in regular Win32 you can handle the WM_APPCOMMAND message. The OS sends that to the active app when the user presses one of the additional keyboard keys or mouse buttons.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Hi Mike, thanks but WM_APPCOMMAND is not supported by pocket Pc
Galvanoski
|
|
|
|
|
This is supposed to simulate a pay telephone
It's not working right for me.
Won't add the time and money.
Any help would be greatly appreciated.
Thanks
#include <stdio.h>
#include <ctype.h>
main ()
{
int coin, total = 0, time=0;
int type;
do
{
printf("\nPlease enter a coin\n(10,20,50)\n[0 to quit]:\n");
scanf("%d",&coin);
if (coin == 10||coin == 20 || coin == 50);
total = total + coin;
} while(coin!=0);
display_time(int total,char type);
printf("\nPlease enter the type of call you wish to make,\n 'L' for local,\n 'T' for trunk,\n 'I' for international:\n");
fflush(stdin);
scanf("%c",&type);
type = toupper;
{
if( type == 'L')
time = (total/10)*30;
if (type == 'T')
time=(total/10)*15;
if (type == 'I')
time=(total/10)*5;
}
printf("Total credits allowed : % d\n\n", total);
printf("You have %d seconds of call time\n\n",time);
main();
{
int total;
char type;
total = getcoin();
type = gettype();
display_time(total,type);
}
}
|
|
|
|
|
Door Mat wrote: It's not working right for me.
Which is fairly meaningless without describing the problem.
Door Mat wrote: int type;
Change this to:
char type; Door Mat wrote: type = toupper;
Change this to:
type = toupper(type); Door Mat wrote: main();
What in the world are you doing here?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Major Thanks Mate.
The program should first request the user to enter coins.
Vaild coins are 10c,20c and 50c. All other values should be ignored.
The program should continue to request coins until 0 is entered.
The program should then request a call type from the user.
Valid call types are L(local), T(trunk),I(international).
The progam should continue to request a valid call type until one is enter.
LOCAL CALLS 30 seconds for 10 cent
TRUNK CALLS 15 seconds for 10 cent
INTERNATIONAL CALLS 5 seconds for 10 cent.
When a valid call type is enter, the program should calculate and display the amount of time the user has to make.
|
|
|
|
|
But what is the problem you are seeing?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
I basically have
foo.h
#include "bar.h"
bar.h
#include "foo.h"
and it results in fatal error C1014: too many include files : depth = 1024.
So I tried doing '#pragma once' in each file, no luck. I then tried doing
#idndef UNIQUE_IDENTIFIER
#define UNIQUE_IDENTIFIER
// all header code
#endif
That didn't work so I tried using the pragma once statement & the above with no luck.
When I say the previous solutions 'didn't work' I mean that objects from foo.h could not be recognized by methods that required them in bar.h, the compiler didn't know what they were.
Ideas?
Thanks!
|
|
|
|
|
chasetoys wrote: ...objects from foo.h could not be recognized...in bar.h
You might need to use either a pointer or a forward declaration.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Could you please elaborate? I'm kind of a newbie
|
|
|
|