首页 > 解决方案 > Using map function to map to user menu options to specific functions

问题描述

I am new to C++ and need some help with the following:

If i have no namespace this works fine as soon as i have this i get a error :

Severity Code Description Project File Line Suppression State Error (active) E0109 expression preceding parentheses of apparent call must have (pointer-to-)

I am attaching a solution where i have implemented this code to show the error.

What i am tryng to achive is to use this map to call my menu options a user can select, it has a header file as well as the cpp implemtation file in it.

I have attached the source code with the error showing when trying to compile this.

I would greatly appreciate some help - sample attached done in visual studio Sample Code

标签: c++pointers

解决方案


推荐阅读