00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "StPrompt.hh"
00027 #include "StThreeVector.hh"
00028 #include <string>
00029 #if !defined(ST_NO_NAMESPACES)
00030 using std::string;
00031 #endif
00032
00033 int main()
00034 {
00035 StThreeVector<float> vec2(1,2,3);
00036 StPrompt("Enter new 3-vector", vec2);
00037 cout << "new value: " << vec2 << endl;
00038
00039 string filename("var.cc");
00040 char othername[16] = "short.c";
00041 double var = 1/3.;
00042
00043 bool answer = true;
00044 while (answer) {
00045 StPrompt("Enter file name", filename);
00046 cout << "new value: " << filename.c_str() << endl;
00047 StPrompt("Enter other name", othername, 16);
00048 cout << "new value: " << othername << endl;
00049
00050 StPrompt("any number", var);
00051 cout << "new value: " << var << endl;
00052
00053 #if defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500
00054 StBoolPrompt("more questions", answer);
00055 #else
00056 StPrompt("more questions", answer);
00057 #endif
00058 }
00059
00060 StPrompt();
00061 cout << "bye" << endl;
00062 return 0;
00063 }