int main(int argc, const char * argv[]) { int max; int a[ARRAY_LENGTH] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; max = maximum(a, ARRAY_LENGTH); fprintf(stdout, "max: %d, calls: %d\n", max, count); // readstdin(argv, argc); prompt2(); return 0; }
void UserWizardP2::OnAddNet(wxCommandEvent &event) { wxListCtrl * listctrl = (wxListCtrl *)FindWindow(ID_U_CONFNETS); wxListBox * listbox = (wxListBox *)FindWindow(ID_U_ALLNETS); if (listbox->GetSelection() < 0) return; wxString prompt(wxT("What is your ")); if (listbox->GetStringSelection() == wxT("ICQ")) prompt += wxT("UIN\non ICQ Network"); else { prompt += wxT(" screen-name\non "); prompt += listbox->GetStringSelection(); prompt += wxT(" Network?"); } wxString screenname = wxGetTextFromUser(prompt, wxT("Contact Information"),wxT(""), this); if (screenname.IsEmpty()) return; long fingstr = listctrl->FindItem(-1, screenname); if (fingstr >= 0) { if (listctrl->GetItemData(fingstr) == listbox->GetSelection()) { wxMessageBox(wxT("Sorry, you can't have the same name/network twice."), wxT("Duplicate Info"), wxOK, this); return; } } wxString prompt2(wxT("Please enter the password for ")); prompt2 += screenname; prompt2 += wxT(" on network "); prompt2 += listbox->GetStringSelection(); wxString pw = wxGetPasswordFromUser(prompt2); m_pwords.insert(m_pwords.begin(), SecByteBlock((const unsigned char *)pw.c_str(), pw.length())); //pw = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; listctrl->InsertItem(0, screenname); listctrl->SetItemData(0, listbox->GetSelection()); listctrl->SetItem(0,1, listbox->GetStringSelection()); }