这将如何在2017年视觉工作室中发挥作用? [英] How this will work in visual studio 2017?

查看:85
本文介绍了这将如何在2017年视觉工作室中发挥作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个函数但是没有打印并给出错误与<<<<运算符和函数的void类型。



错误二进制'<<':找不到运算符,它采用'void'类型的右手操作数(或者没有可接受的转换)



我尝试过:



I already made a function but just not printing and giving the error with compatability of the << operator and the void type of the function.

Error binary '<<': no operator found which takes a right-hand operand of type 'void' (or there is no acceptable conversion)

What I have tried:

std::cout << Utilities() << std::endl;

推荐答案

它与Vs 2017无关......

'<<'运营商 [ ^ ]用于将右侧值插入(推)到左侧stream(在本例中为cout)...

但是Utilities()不返回任何内容(void)!!!
It has nothing to do with Vs 2017...
'<<' operator[^] is used to insert (push) the right side value to the left side stream (in this case cout)...
However Utilities() returns nothing (void)!!!


这篇关于这将如何在2017年视觉工作室中发挥作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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