OOP问题,请回复..... [英] OOP questions please reply........

查看:129
本文介绍了OOP问题,请回复.....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Q9:两者之间的区别(以表格形式)…功能&成员功能?
问题10:命名使文件指针能够设置为写操作的功能?

Q9:Difference between (in a tabular form)…FUNCTION & MEMBER FUNCTION?
Q10:NAME THE FUNCTION THAT ENABLES A FILE POINTER TO SET IT FOR WRITE OPERATIONS?

推荐答案

i.函数具有全局或局部范围(取决于编码),成员函数属于类/结构,访问限定符表示其行为.

ii. FILE * fp = fopen("myfile.txt","wt"); //"wt"代表写文本
fprintf(fp,"Hello world!\ n \ r")//写入"Hello world!"在myfile.txt
fcolse(fp); //关闭文件
i. A function has a global or local scope depending on coding, a member function belongs to a class/structure and access qualifiers denote its behavior.

ii. FILE *fp=fopen("myfile.txt","wt"); // "wt" stands for write text
fprintf(fp,"Hello world !\n\r") // writes "Hello world !" in myfile.txt
fcolse(fp); // closes file


这篇关于OOP问题,请回复.....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆