由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 请教一个C++试题!
相关主题
用一个C++面试题challenge一下大家为什么会有很多人认识年纪大了刷不过年轻人?
新鲜RocketFuels电面问道高频设计题
我这种情况该怎么办, 可以这样做吗?找工作的一些心得-information section
请教: 想用java实现解析parse一个log文件,多谢指点我来说个简历吹牛吹破的故事。
Informational Interview without technical phone screen面经一篇,攒rp
一个新鲜twitter面经范律师专栏:A Funny Conversation With CIS
dropbox 面经information session 需要dress up 吗?
问一道关于java type cast的面试题有人知道Morgan Stanley Technology information session吗?
相关话题的讨论汇总
话题: plogger话题: message话题: c++话题: functiona话题: logger
进入JobHunting版参与讨论
1 (共1页)
m****g
发帖数: 118
1
I need some help with a small C++ project since I do not have background in
programming functions such as “Logger”. Any help would be really
appreciated. If you would point me to some tutorial of similar programming
problem will be great!
Problem Description:
You must provide a simple logging framework in C++ that conforms to the
following pseudocode interface:
pLogger
{
LogInfo( message )
LogWarning( message )
LogError( message )
}
Example of code using this logger would be:
FunctionA( pLogger )
{
pLogger->LogInfo( "This is an informational message" )
pLogger->LogWarning( "This is a warning message" )
pLogger->LogError( "This is an error message" )
}
Main()
{
pLogger = BuildLoggerSomehow()
FunctionA( pLogger )
pLogger = BuildLoggerSomeOtherWay()
FunctionA( pLogger )
}
Okay, simple enough in terms of usage. However, we have the following
requirements.
1) Extension Point : Logging Destination
We need to be able to support multiple logging destinations. For example we
would like to be able to have a logger that logs to the standard output, or
to a file, or to a remote server, or to the bit bucket, or whatever
destination is required in the future.
2) Extension Point : Message Format
We need to be able to support multiple message formats. For example:
10:09:56 : WARNING : This is a warning message
1 (共1页)
进入JobHunting版参与讨论
相关主题
有人知道Morgan Stanley Technology information session吗?Informational Interview without technical phone screen
遍一个自己的地址合法吗?一个新鲜twitter面经
新人若问,open information session大概是干吗的?dropbox 面经
Onsite 被拒原因问一道关于java type cast的面试题
用一个C++面试题challenge一下大家为什么会有很多人认识年纪大了刷不过年轻人?
新鲜RocketFuels电面问道高频设计题
我这种情况该怎么办, 可以这样做吗?找工作的一些心得-information section
请教: 想用java实现解析parse一个log文件,多谢指点我来说个简历吹牛吹破的故事。
相关话题的讨论汇总
话题: plogger话题: message话题: c++话题: functiona话题: logger