May 16, 2000

How to Emit a Beep?

Question: How do I make a beep in C++? I’d like to make my program alert the user in case of errors. Answer: Use the ‘a’ escape sequence to emit a beep.For example: const char ALERT = ‘a’;if (input < 0){ cout

SQL Script from Linux OS

Question: How can I run an Informix SQL Script from the Linux Operating System command line directly? Answer: Use this format: dbaccess The is the name of the database and the is the name of the sql script, with an extension of *.sql.You also can create a c-shell alias that

SQL Server Datatypes

Question: Why doesn’t the datatype called sysname show up in all the tables’ dropdown lists of datatypes? Answer: The sysname datatype is a system datatype used to store database object names such as table columns, variables and stored procedure parameters. This is a user-defined datatype based on the nvarchar datatype

Private Member as Return Type?

Question: I was trying to test a base class and I came across an unusual question: in the below code, why doesn’t the compiler complain about the return code type being a private member? class TestCompile{ private: enum action { encrypt, decrypt }; public: action getAction(){return encrypt;}}; I believe it