|
Thanks for the detailed explanation.
I really the namespace idea.
I'm a c# guy so I'm getting used to c++.
One question though.
If its a namespaces how do I import the namespaces to use the enum? And how would I do the case statement with your solution?
sorry for the lack of experience but I would like to know.
Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
use :
case WordDirection::Right :
:: is the scoping operator.
|
|
|
|
|
that is sooo coool.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Ista wrote:
Thanks for the detailed explanation.
You're welcome
Ista wrote:
If its a namespaces how do I import the namespaces to use the enum?
You don't import namespaces like you do in .NET. You include the file that contains a part of the namespace rather than importing the entire namespace (which in turn can be spread across multiple files).
Ista wrote:
And how would I do the case statement with your solution?
As an other user already explained, the scope resolution operator (:: ) is used to get access to namespace declarations and / or static class members. The syntax is the same in this matter. The following code example demonstrates the syntax of namespaces and static class members:
namespace SomeNameSpace
{
extern const int nSomeInt;
}
class SomeClass
{
public:
static const int nSomeInt;
};
int i = SomeNameSpace::nSomeInt;
int j = SomeClass::nSomeInt;
Ista wrote:
sorry for the lack of experience but I would like to know.
Don't be sorry for that! Everybody once lacked experiance. Eventually you'll get there!
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
helo.. im doing a c++ project n i need to know how to create username n password (the source code n intefere).. pls let me know where i can find or pls help me...thank you in advance.. reply me vry soon.
|
|
|
|
|
Do you have a database to store them in ? If not, they are going to be static ? You need to tell us a lot more about your project and how you want to use the username/password before we can give you any specific help. Do you want more than one user ? To change passwords ? Where are you intending to store them ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ok.. we r have to do a Airline System in c++ using OO concept. the thing is we must create an Airline Passenger Seat System to provide information about passenger seats to passenger. as a admin in the system we have to create a username n password to admin as well as other admins(admins only n not passengers) to add, remove or modify passenger seat. about the seat allocation... my friend is doing.. i suppose to do the username n password. yes, we r intend to store them in database.
|
|
|
|
|
OK - so this is your homework.
Well, you store the username/password combinations in a table in your database, and you have a stored procedure that you call which takes the username/password pair and returns true if that pair was found in the same row of the database.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ok.. can i do the interafce in VB and coding in C++. how am i going to connect with this ?? it working or not ?
|
|
|
|
|
Anonymous wrote:
can i do the interafce in VB and coding in C++.
If you must, you can use COM to make VB talk to C++. I would not bother though, for this ( as much as it hurts me to say it ) you would probably find it quickest to use VB for everything. There's not a lot of business logic, and no reason to need C++'s flexibility or speed.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want my program to write something for read only and later be able to print it. I do not want to use graphics or what they call drawing context. i want to display some simple text like this and be able to print it when a button is clicked for printing
|
|
|
|
|
You don't want to paint graphics in to a DC, you just want plain text. You can do this a number of ways, the easiest would be to put a control that acts as a label on the screen, and set it's text. ( I don't recall what the MFC control to do this is, though ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
( I don't recall what the MFC control to do this is, though ).
Are you thinking of CStatic ?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
That's the one. It's been too long.....
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello All,
I am writing a small RTP recorder application. I am receiving the audio in RTP packets and I have to store the audio data to a .wav file.
The payload type is G.711 PCMA 8000 KHz (Value - 8). I extract the payload and stored it in a file ("test.wav"). When i tried to play the file in "Media Player" and "Real Player" says the file is corrupted. Since it is raw PCM data i expected saving the payload in .wav file directly will play the audio.
Can any one suggest, whether the procedure followed is correct? Storing the payload with out any conversion / decoding?
Is there any site or document which tells about the procedure to be followed
Note: I may start start recording in the middle of audio file playing also.
Thanks in Advance
Ravi
|
|
|
|
|
Ravi Sankar S wrote:
Can any one suggest, whether the procedure followed is correct? Storing the payload with out any conversion / decoding?
Is there any site or document which tells about the procedure to be followed
I know nothing about G.711 and wav formats, but this article about the wave file format[^] might be of help.
--
"Google is your friend" jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Create a directshow filter graph with source filter, G.711 decompressor and wav writer.
Don't try it, just do it!
|
|
|
|
|
Thanks Alex....
Thanks for ur suggestion. Let me explain the application bit more detail. It is recording application. the functionality is to record the VoIP calls going on in a LAN. So application can receive multiple VoIP call data. For each call there are sending and receiving ports. Since the packets are targetted to my system, I can not use normal socket for receiving the paceket I have to receive the packet using promisious more using any packet capture library. I am using WinPCap used which is widely used.
When I receive the packet in promisious mode i am able to capture the packet, i am able to parse it and store the packet. The codec in which i receive the packet is G.711. When i store the pay load with proper WAVE file header and specify that it is G.711 format i am unable to get the replaying properly.
I use Etherial for cross checking the packets received. The payload is correct and codec type is also G.711. When I tried to store the payload using the statistics option provided by Etherial i am able to replay the voice perfectly.
In my application the procedure what i followed is here
until RTP BYE / RTCP BYE packet
get the RTP packet
retrive the payload
dump into a file
end until
add the WAVE header
and store the file.
I tried with DirectShow it is very slow... So I could not use that I have to go for very low level programming since the number of packets and number of VoIP calls are more....
I feel after receiving the RTP packet and before storing
whether i need to do any convertion?
is the procedure followed is correct?
Please clarify
Thanks
Ravi
|
|
|
|
|
Sir
I am working as a developer in a company
which is about to develop a VOIP communiction
terminal, i need help for the firmware & coding
Meaning is there any Good SoC available in market
for VOIP , or if ther any Stack available for Voip.
Currently we making a feasibility study by making a
small project in VC++ and implementing VOIP on LAN.
Were can i find the refrences for H.323 & SIP ?
If u know any forum from were i can get help let me know
Eager for your reply
vikas.amin@embin.com
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
i want to create a status dlg which can display the status of a process, for example transfer files.
i find that use user created thread to control UI often causes crashes or make system hung. so i have to change to using timer.
is user created thread not allowed to control UI display?
|
|
|
|
|
hello,
I also have a similar kind of problem.I need to update data from my UI(dialog box with some controls).So aren't user interface threads not of use?Did you try the OnTimer function?
Tell me if it works?
|
|
|
|
|
my boss told me that user created thread cannot be used for updating the UI data. i am wondering wheather it is true as i never see this in MSDN.
timer works properly. i think the other way is to use event, but i have tried this way
|
|
|
|
|
http://www.codeproject.com/threads/usingworkerthreads.asp[^]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
a_du wrote:
is user created thread not allowed to control UI display?
No. Since the secondary thread does not own the UI or the message pump, it has no choice but to post a message to the main thread indicating that something needs to be updated.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Respected All
I have problem related to bitmap.
"I loaded a bitmap on a dialog now i want to display data at different position on this bitmap at runtime using control(text labels) which will have that data
so now simply i can say that how i can load control(text labels) at RunTime on a Dialog.
david
|
|
|
|