float x,y,z;
char a[10]="";
char b[10]="";strcpy(a,"z=x+y");
x=1.0f;
y=2.0f;
a;//A
sprintf(b,"%s",z);
AfxMessageBox(b);What's your meaning about line A?It does nothing.
If you want "z=x+y;" to be run correctly, it's disappointed!
In fact, you can maka a function to avoid that idea:
void f(float a,float b,float &c)
{
c=a+b;
}f(x,y,z);//replace line A
sprintf(b,"Z=%f",z);
... ...
char a[10]="";
char b[10]="";strcpy(a,"z=x+y");
x=1.0f;
y=2.0f;
a;//A
sprintf(b,"%s",z);
AfxMessageBox(b);What's your meaning about line A?It does nothing.
If you want "z=x+y;" to be run correctly, it's disappointed!
In fact, you can maka a function to avoid that idea:
void f(float a,float b,float &c)
{
c=a+b;
}f(x,y,z);//replace line A
sprintf(b,"Z=%f",z);
... ...
解决方案 »
- VC中ClistCtrl过滤数据问题
- 可能要用到网络编程,达人能给点建议么?
- 删除数据不成功
- ATL设计COM--基础问题
- 关于指针转换问题
- 数据库编程,直接调用sql语句时,是否需要先关闭记录集,再调用sql语句,最后再打开记录集?还是直接调用,不考虑记录集的关闭和打开?
- 文本编辑 快捷键Shift+Tab消息捕获
- 有人用过ActiveX Control控件的Microsoft Web 浏览器控件么?有个简单问题请教,解决问题给100分.此贴50分顶者有分.
- COM组件的问题???
- &&请问大家知道免费的电脑图书的网址吗?&&
- ftp -s的问题
- 谁能给我一个使用COM的例子,最好有源码,见码送分(100)
It's no sense of doing so.Why do you wanna do so?No other way of avoiding?
My eMail:[email protected]
It's no sense of doing so.Why do you wanna do so?No other way of avoiding?
My eMail:[email protected]