[Solved] find the input is alphanumeric or not with using #define macro preprocessor in c

[ad_1] Here is the macro: #define IS_ALNUM(x) (((x)>=’a’ && (x) <= ‘z’)) ||((x)>=’A’ && (x) <= ‘Z’)) || (((x)>=’0′ && (x) <= ‘9’))) It tests if it is Between a and z Between A and Z Between 0 and 9 Quite simple 2 [ad_2] solved find the input is alphanumeric or not with using #define … Read more

[Solved] what is the reason of this error?

[ad_1] The problem is that the class definitions are not visible to the compiler when you try to access members of an instance. Although you have provided forward declarations for the classes this is not enough. In the .cpp and .h files that access members of these classes or require their sizes you need to … Read more

[Solved] Convert SQL Query To LINQ?

[ad_1] I didn’t test it, but it should look something like that : var query = (from s in Suppliers select new { SupplierId = s.SupplierId, CompanyName = s.CompanyName, ContactPerson = s.ContactPerson, Address = s.Address, Email = s.Email, InActive = s.InActive, BranchId = s.BranchId, CreateDate = s.CreateDate, CreatedBy = s.CreatedBy, UpdateDate = s.UpdateDate, UpdateBy = … Read more

[Solved] Quick way to compare arrays with LINQ

[ad_1] Based on Nacho’s idea, this is my solution (not ideal, but I’ll take it for now): [TestCase(new int[] { 0, 1, 2, 3 }, true)] [TestCase(new int[] { 0, 3, 4 }, false)] [TestCase(new int[] { 4, 4, 4 }, true)] [TestCase(new int[] { 6, 6, 8, 8 }, true)] [TestCase(new int[] { 5, … Read more

[Solved] Why vector not free objects or what happens anyway? [closed]

[ad_1] Annotate your class a little more, and that should make clear what is happening. #include <vector> #include <cstdio> using std::printf; using std::vector; class cVtst { static int seqCounter; int seq; int v; public: cVtst(int v) { this->v = v; this->seq = ++seqCounter; printf(“Creating cVtst#%d %d\n”, seq, v); } ~cVtst() { printf(“Closing cVtst#%d %d\n”, seq, … Read more

[Solved] List of classes in an assembly C#

[ad_1] Here’s a little class I whipped up some weeks back when I was bored, this does what you’re asking of – if I understand the question correctly. Your applications must implement IPlugin, and must be dropped in a “Plugins” folder in the executing directory. public interface IPlugin { void Initialize(); } public class PluginLoader … Read more