|
Since you stop collecting inputs at first newline but then ouput the whole array content, some resulting garbage is inevitable, I suppose.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello all.
I want to define an array in c win32 console. First column should be name & family of students and other columns should be grades of them.
NOW HELP ME : How can I have this array with first string column and other columns in float.
Thanks in advance.
|
|
|
|
|
Create a structure with name and grades as members.
struct _tagStudent
{
char Name[256];
float Math;
float Science;
}; Now you can create an array of Students.
struct _tagStudent Student[100];
You can access the members as follows -
Student[0].Name;
Student[0].Math;
Student[25].Name;
Student[25].Science;
|
|
|
|
|
how to know the parent item of a child tree item.
and how to traverse from last child item to root parent item.
|
|
|
|
|
1- GetParentItem ( HTREEITEM );
2- you'd loop over the items returned by GetParentItem until the item is TVI_ROOT (or something like that)
Watched code never compiles.
|
|
|
|
|
Sakhalean wrote: how to know the parent item of a child tree item.
and how to traverse from last child item to root parent item.
What do you have, i mean where do u struck? do you have HTREEITEM of child?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Sakhalean wrote: yes i have HTREEITEM
To Find Parent TreeItem:
call GetParentItem(child tree item)
To Find Root TreeItem:
HTREEITEM child = HTREEITEM of child;
HTREEITEM root = NULL;
do
{
root = GetParentItem(child);
child = root
}
while(root != NULL);
root will contain root tree item
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
|
Have u tried SetForegroundWindow??
|
|
|
|
|
Yes I had tried but that was not working so I was asking here
|
|
|
|
|
Did you only use SetForegroundWindow or combination of SetForegroundWindow and SetWindowPos???
Try This..
Sleep(5000);
::SetForegroundWindow(this->m_hWnd);
::SetWindowPos(this->m_hWnd, HWND_TOPMOST,0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
|
|
|
|
|
I had only used SetForegroundWindow. Yup! This combination is also working.
|
|
|
|
|
rahul.kulshreshtha wrote: Yup! This combination is also working.
What else is working?
|
|
|
|
|
Check out my first reply.
It is also working
Sleep(5000);
::BringWindowToTop(this->m_hWnd);
::SetWindowPos(this->m_hWnd, HWND_TOPMOST,0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
::SetWindowPos(this->m_hWnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
Third line is to make it NoTopMost otherwise it will be always on Top.
|
|
|
|
|
Hello all,
I have a question, Can we install IIS in client system programmatically? , If yes then i will appreciate some links and answers regarding that.
Regards
Ashish
|
|
|
|
|
Which version of IIS do you intend to install?If it is IIS6 see here.
[EDIT]
In addition this may be useful too.
[/EDIT]
Life is a stage and we are all actors!
|
|
|
|
|
Thanks for your reply, But i intend to install IIS version 5.1..
|
|
|
|
|
I've found that for IIS 5.1 .
Life is a stage and we are all actors!
|
|
|
|
|
To be very frank, I don't see any help code in the link.. How do i do this in VC??
|
|
|
|
|
Does anyone know how to install IIS using Sysocmgr.exe?
|
|
|
|
|
Hey everybody.
Here's a C++ question.
I have 2 classes:
template<typename T>
class A_template
{
public:
... other stuff ...
void operator = (T* other){ _obj = other; }
protected:
T* _x;
};
class B : public A_template<C>
{
... some functions ...
};
Now, the problem is that if I have the following line of code:
C* x = CreateC();
B b;
b = x; // <--- compiler returns that there is no possible conversion, but it does, in A ! what am I doing wrong??
Thanks a lot !!!
|
|
|
|
|
Oh,
and the definition of B is:
class B : public A_template<c>.
|
|
|
|
|
assignment operator works like the constructor when it comes to inheritance. You should read more about this.
Also read about:
<br />
using A<T>::operator =;<br />
which should be placed in the declaration of B
|
|
|
|