|
the thing is that this p_channel is assigned a value in the construction of the class, meaning that the constructor is responsible for initializing this pointer
so when i call p_channel->"whatever" it is supposed that it is already initialized
|
|
|
|
|
what?? you say B* p_channel then how can it be ?You should've put B* p_channel=new B; Even I didn't notice it.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
How to initialized p_channel?
|
|
|
|
|
??whitesky?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Why
|
|
|
|
|
Your post looked like you are asking how to initialize a pointer
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
wow really
|
|
|
|
|
Yes guys i was wrong
i was passing the pointer to the constructor without initializing it
this is wierd, how did i forget to initialize a pointer.
thnx 4 u help it was really useful. :=)
|
|
|
|
|
Hello everyone,
I am using Visual Studio to create a solution, and in this solution, there are several projects which have dependencies, for example, the output of one project is a DLL and another project will utilize it to build an executable application.
My question is, whether Visual Studio could recognize the dependencies and build projects in correct sequence? Means, building DLL project first, then build the executable application.
If Visual Studio could not, I have to build them manually one-by-one in the correct sequence.
thanks in advance,
George
|
|
|
|
|
I think it should do it automatically according to the sequence it displays in the solution explorer. You can easily test it with the output .exe right?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
I have tried that I can not change the sequence of projects in one solution in Visual Studio 2003.
regards,
George
|
|
|
|
|
Only if you specified the dependencies (right-click on the solution and select 'Project Dependencies ...').
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I am using Visual Studio 2003, and I can not find a Dependencies or something when I right click a project in Solution Explorer window. Which IDE are you using?
regards,
George
|
|
|
|
|
Yes, you can set the dependencies of various projects within a solution.
In VS8 bring up the "Solution Explorer" (Ctrl+Alt+L)
Right click on the solution, select "Properties" from the popup menu
Under "Common Properties" select "Project Depenencies"
Select the project from the "Project" combobox and select which projects it depends on from the list below.
VS6 and VS7 have the same functionality, but are probably found elsewhere in the IDE.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Thank you PJ!
I have tried your method and it works! Cool!!!
regards,
George
|
|
|
|
|
Thanks from me too . I'll keep this in mind when I start to use VS8 .
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
This is probably the most challenging problem I have faced to date. I have read most of the parser related articles here on CP, downloaded and played with libraries such as boost::regex and spirit, but I am still uncertain. I feel these libraries have too much functionality for what I need, though spirit does come close.
Here's the problem. I am creating a game similar to a card game. This game has regional variations and alternate scoring schemes. I figured the best way to handle this is to place the regional details into an editable file (.xml). This way changes can be made to the gameplay without having to hardcode anything into the exe.
A winning hand compromises of 4 sets of 3 cards (either sequncial or identical) and one pair (identical). Higher scores may be achieved by building hard to find sets e.g. a run of 1D2D3D has a higher value than say 4D5D6D. (D being Diamonds and 1D being the lowest card).
Somehow I need to create a method of adding string representations of winning hands to an xml file, which in turn can be scanned by the exe and compared to the actual users hand. Simple hands like the example are of no problem, but writing a definition of a complicated hand causes trouble. For example, some regions only allow the use of two suits in the winning hand, hard to find cards always have higher values but sometimes a region may not use certain combination scoring.
Any help, suggestions or advice would be greatly appreciated with this one.
|
|
|
|
|
Please help me in my project.
#sanroop#
|
|
|
|
|
Your question has no answer. A CString is a string wrapper, the information it stores is the characters in the string. The control which renders the string ( well, actually, the device context into which the string is rendered ) is responsible for the font that's used to represent it. So, you probably need to look at the CFont class if you're drawing hte string yourself, and if you're assigning the string to a control, such as a window header, then you need to see if you can set a font on that control, or if you're going to need to owner draw the control to change the font.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I think you need to change font of a control not CString class
|
|
|
|
|
Thanque for u r reply ,but in mt priject i was stored the variable in Cstring that variable required to diasplay on message box in different font.Kindely give help me in my project.
#sanroop#
|
|
|
|
|
Don't you understand what Christian Graus told you?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
The CString does not contain font information.
BUT
you could use some markup language to tag your text, a little bit like what HTML is doing ..
BUT
you will need a control that can understand that markup language and then draw the string accoring to the different markups.
|
|
|
|
|
Here's something I did for a Dialog Box --- changing the font size and the font type. This was done in the Initializer of the class:
(m_Font is of type CFont() )
// create an Arial font of 11 pixels
m_Font.DeleteObject();
m_Font.CreatePointFont(160, _T("Arial"));
m_canx.SetFont(&m_Font);
m_ok.SetFont(&m_Font);
// set the font to be larger for all the controls on the verify page
GetDlgItem(IDC_TEXT1)->SetFont(&m_Font);
GetDlgItem(IDC_TEXT2)->SetFont(&m_Font);
GetDlgItem(IDOK)->SetFont(&m_Font);
GetDlgItem(IDCANCEL)->SetFont(&m_Font);
GetDlgItem(IDC_NOTICE)->SetFont(&m_Font);
This should help you figure out what to do for your code.
John P.
|
|
|
|
|
hi,
I have wrote a static function and i have declared static int variable in a class.initally i have set the value of variable to zero,in another function which is not static , i have incremented this varible by one,in the first static funtion ,i have written a if condition if(m_inCoun==1){do this };i have decremented the varible count by one ,in the if condition.When i compile the code i getting LNK1120:error..what could be the reason...?
Thanks in before
James
|
|
|
|