将控制台应用程序转换为GUI
Converting console application to GUI
我找到了一个C++代码来将纬度/经度转换为UTM坐标。
代码在这里。
我想使用.NET GUI(windows窗体)而不是控制台屏幕。
现在,我将从textBox
读取值,而不是在控制台中输入值22.2 33.3
。然后调用转换函数。
我面临的问题是,我不知道应该将什么参数传递给函数
`CvtLine(int C, char**V, char*p)`
从控制台应用程序的主要功能调用:
代码
int main(int argc, char**argv){ //2010-08-11: was void main(...
char buf[256]; char*p; int L,ac; char*av[129]; //vars for reading stdin
cout<<setiosflags(ios::fixed); //decided against including ios::showpoint
Fmt=fUT4|fLLD|fLLDM; //default for Fmt, if not specified by input
--argc; ++argv; //remove spurious first element of argv array
while(argc && memcmp(argv[0],"--",2)==0){ //handle leading options: --Outputformat, --test, --help
if (isdigit(argv[0][2])) Fmt=atoi(argv[0]+2); //for --<DIGIT>, parse Outputformat into Fmt
else if(strcmp(argv[0],"--test")==0) {Testcases(); return 0;} //for --test, run testcases & exit
else {Usage(); return 0;} //for --help, show Usage & exit
--argc; ++argv;
}
if(argc==0) while(cin.getline(buf,256), cin.good()){ //0 args, read stdin converting each line
p=buf; ac=0;
while(1){ while(*p&&strchr(" t",*p))++p; if(*p==0||*p=='#')break; av[ac++]=p; while(*p&&!strchr(" t#",*p))++p;} //break line into whitespace-separated words
if(ac>=2&&ac<=4) CvtLine(ac,av,p); //line with 2|3|4 words, convert and print
else if(ac==0) cout<<buf<<"n"; //line with no words, echo the line (comments)
else cout<<"==invalid number-of-words: "<<buf<<"n"; //anything else is invalid, produce errmsg
}
else if(argc>=2&&argc<=4) CvtLine(argc,argv,""); //2|3|4 args, convert and print
else Usage(); //argc other than 0|2|3 is invalid, show Usage
return 0; //2010-08-11: added when void became illegal
}
查看.NET空间参考和投影引擎库。http://projnet.codeplex.com/
.NET空间参考和投影引擎
Proj.NET在大地测量之间执行点对点坐标转换用于fx的坐标系。地理信息系统或GPS应用程序。
这是他们的常见问题解答,有一个关于在系统之间转换的代码示例。将点从一个坐标系投影到另一个
相关文章:
- C++实用程序::转换在静态链接库中不起作用
- 如何将我的小程序转换为用于项目的函数?
- 将通用Windows应用程序转换为VisualStudio 2019上的常规应用程序
- 如何将我的程序转换为.dll文件并使用rundll32.exe在cmd中运行它?
- 将 C 程序转换为具有大量字符* 和无符号字符转换错误的C++
- 将视觉C 媒体基础捕获应用程序转换为C 构建器
- Qt 创建器中的实用程序::转换::to_string_t中的链接错误
- 将Parralel CUDA程序转换为顺序运行
- Pthreads - 将顺序程序转换为并行程序
- 尝试将工作python程序转换为C++但不起作用
- 如何在 GUI 程序 C++ 而不是控制台中传递 argv 参数
- 将带有 std::cout C++程序转换为 NCurses / CDK
- 通过C GUI程序将国际象棋引擎连接起来
- 面向对象设计-将C应用程序转换为C++
- 将带有迭代器的C++程序转换为 Boost MPI 并行程序
- 可视化如何将项目 win32 控制台应用程序转换为C++ Windows 窗体
- 无法关闭 GUI 程序
- 如何使用 openMP 将顺序程序转换为并行程序
- 将C++程序转换为使用 GMP
- 将控制台应用程序转换为GUI