请...我需要这个代码的提示 [英] please ... I need hint with this code

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

问题描述

大家好,

最近,我在工作中需要此程序,希望您能以c ++编程语言为我提供帮助:

我如何编写可以区分和识别任何输入字符的代码,然后将任何输入分隔开来,然后将每个输入都放置为其类型,例如:

#是特殊字符
主要是保留字
33是数字

C ++程序中的其他情况...

我希望使用功能而不是简单的代码来实现它?

任何人都有这个想法的任何代码...我恳求他给我它以完整执行我的代码...

和thanx 4全部.

Hello every body ,

recently I needed this program in my work and I hope that you help me in c++ programming language :

how I can write the code which it can distinguish and recognize any input character and then separate any input apart from the other and put each of them with its type such as :

# is special character
main is reserved word
33 is number

and other cases in the program of C++ ...

and I wish to do it with function not simple code ?

any one have any code with this idea ... i beseech him to give me it to accomplish my code with full execution please ...

and thanx 4 all.

推荐答案

您需要开发一种语言的扫描仪,对吗?
如果上述任务不是家庭作业,请查看 flex [手动"实施扫描仪...).
:)
You need to develop a scanner for a language, don''t you?
If the above task is not homework, then have a look at flex[^], it may help you a lot (if it is homework, I suppose you need to ''manually'' implement the scanner...).
:)


这篇关于请...我需要这个代码的提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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