|
Well, work out what you would do to install them manually and replicate that. It's not rocket science. Think about it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello,
For example, I have files with sorted numbers. One way to merge them and save a sorted order is to use a merge sort algorithm. Where a C++ realization of the algorithm (for files, not for memory) can be found ?
|
|
|
|
|
alikalik wrote: Where a C++ realization of the algorithm (for files, not for memory) can be found ?
For instance you may develp it. You are a developer, aren't you?
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]
|
|
|
|
|
you could find it here....
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Wikipedia[^] has an algorithm for merge-sorting from tape files - that should be sufficient for you to write an implementation.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
alikalik wrote: Where a C++ realization of the algorithm (for files, not for memory) can be found ?
That is good way of asking how can it be done
|
|
|
|
|
alikalik wrote: Where a C++ realization of the algorithm (for files, not for memory) can be found ?
How would you do it without a computer? If you had two stacks of paper containing names, how would you go about merging those two stacks together into one?
Now if you are having trouble with accessing arrays and swapping items in them, don't bother with sorting until you get over that hurdle.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
hi i have a project of schedulling for a university through genetic algorithm.
can anyone help me out.
thanx in advance.
|
|
|
|
|
Maybe...
Seriously, if you want help ask a precise question. Please, read the posting guidelines ("How to get an answer to your question") for some tips on how to format your question properly.
|
|
|
|
|
|
Have you tried:
void main( void )
{
std::cout << "This is my genetic algorithm scheduling project for university." << endl;
std::cout << "I have learned a lot from it." << endl;
}
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
hello,
i have a working vc++ application(few kilobytes) which i want to run as a service. please guide me how to do this ? is there any way to create an installer for it ?
btw thanks
rahul
|
|
|
|
|
|
Madhu Nair wrote: How to: Create Windows Services[^] (C++ Programming)
Sorry Madhu, but i don't think it gives any good light on what the question is
HARSH
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
|
|
|
|
|
Bing for the program "srvany"
--Mike--
Dunder-Mifflin, this is Pam.
|
|
|
|
|
rahuljin wrote: i have a working vc++ application(few kilobytes) which i want to run as a service. please guide me how to do this ?
See here, here, here, here, and here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
My object is to read the text file containing the name and ages of the students, character by character and then store them in a structure. (For test purpose I want to store just one record) I wrote the following code but it is giving an error "aggregate'main():: record r' has incomplete type and cannot be defined". Why is this?
main()
{
char ch[80],alpha[100],data[80];
int n=0,sno=2;
FILE*fp;
fp = fopen("records.txt","rb");
if(fp == NULL)
{
puts("Cannot open file");
exit(1);
}
struct record;
{
char name[80];
int age;
};struct record r;
while(1)
{
ch[n]=fgetc(fp);
if (isdigit(ch[n])&& ch[n-1]==32)
{r.name[n]=ch[n-1];
n=n+1;
if (n==1)
break;
}
}
fclose(fp);
}
|
|
|
|
|
Razanust wrote: struct record;
{
char name[80];
int age;
};struct record r;
1. Declare the struct outside the main function
2.
struct record; <--
{
char name[80];
int age;
};
Remove the semicolon while declaring the struct.
|
|
|
|
|
Razanust wrote: struct record;
remove the ';' there and see.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
Wow! Your code has so many problems. For example, how exactly does the while() loop end?
Razanust wrote: My object is to read the text file containing the name and ages of the students, character by character and then store them in a structure.
See here.
You could also use fscanf() like:
fscanf(fp, "%s %d", r.name, &r.age);
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
hi
i need an edit ctrl for entering numerical values. sometimes these values must lie in a specified range. otherwise, i want to warn the user by changing the edit-box color.
i derived a class from CEdit for this purpose and tried to put the code in the CtlColor:
HBRUSH MyEdit::CtlColor(CDC* pDC, UINT nCtlColor)
{
if (d_chars==decimalChars)
{
CString s;
GetWindowText(s);
USES_CONVERSION;
int val=atoi(T2A(s));
if (val<d_minVal || val>d_maxVal)
{
pDC->SetTextColor(RED);
pDC->SetBkColor(YELLOW);
}
}
return NULL;
}
i don't need to change the default brush used for painting the ctrl, so i return NULL. but this doesn't work. i tried returning a valid handle to a brush i created, but i could at most change the background color, not the text color.
what's the problem?
what's the best solution?
thx
|
|
|
|
|
ilostmyid2 wrote: derived a class from CEdit for this purpose
This is not correct.
WM_CTLCOLOR is sent to the parent window.
So you should be handling OnCtlColor of the parent dialog.
In that, check if the message is for your particular edit control and then do pDC->SetTextColor .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
MyEditBox::MyEditBox()
{
m_brush = NULL;
itemData = NULL;
}
MyEditBox::~MyEditBox()
{
delete m_brush;
}
BEGIN_MESSAGE_MAP(MyEditBox, CEdit)
ON_WM_CTLCOLOR_REFLECT()
END_MESSAGE_MAP()
bool MyEditBox::SetColorScheme(COLORREF brushColor, COLORREF bgTextColor, COLORREF fgTextColor)
{
delete m_brush;
m_brush = new CBrush(brushColor);
bgc = bgTextColor;
fgc = fgTextColor;
Invalidate();
UpdateWindow();
return (m_brush != NULL);
}
void MyEditBox::ResetColorScheme()
{
delete m_brush;
m_brush = NULL;
Invalidate();
UpdateWindow();
}
HBRUSH MyEditBox::CtlColor(CDC* pDC, UINT nCtlColor)
{
if (m_brush == NULL)
return NULL;
pDC->SetTextColor(fgc);
pDC->SetBkColor(bgc);
return (HBRUSH)m_brush->GetSafeHandle();
}
|
|
|
|
|
I have created an MFC app as a SDI supporting doucment/view architecture. The main classes are: CMainFrame, CView, and CDocument. In my app I want to dynamically create a CListView when the user select a menu item. I've added CListView class to my project. In my OnInitialUpdate() I'm doing InsertColumn() calls and in OnUpdate() I'm doing InsertItem() and SetItemText(). When a menu item is select I am basically set a point to a new CListView object. What is not working is that nothing is being displayed on the screen !!! I know once the memory is allocated for the new CListView object I need to call Create() function. Don't know what I need to pass or how to link this to my CView class so that it is acutally displayed. Please help. I have not seen any good examples on dynamically creating a CListView object.
|
|
|
|
|