[Solved] Combining two exe files [closed]

The only good solution is to port the oldest code (2006) to VS2010 (or both project to newer compilers), and compile a new executable from a fresh solution where you combine both projects as you wish. As commented, merging two executables makes little sense in general (what is the entry point ? What about conflicting … Read more

[Solved] C# How to modify text file [closed]

Add this reference first System.IO Then: For reading: string[] accounts= File.ReadAllLines(“accounts.txt”); //each item of array will be your account For modifying : accounts[0] += “|1”;//this adds “|1” near password accounts[0].Replace(“|1″,”|0”); this will change the “|0” text to “|1” And For writing: File.WriteAllLines(“accounts.txt”,accounts); 4 solved C# How to modify text file [closed]

[Solved] In C#, is there any more elegant way to take a DateTime and calculate how many months until the “next” Quarter? [closed]

This should do it: int untilNextQuarter = 4 – (currentMonth % 3); Or a slightly clearer but slightly less efficient approach: int[] remainingMonths = new[] { 3, 2, 4 }; int untilNextQuarter = remainingMonths[(currentMonth – 1) % 3]; solved In C#, is there any more elegant way to take a DateTime and calculate how many … Read more

[Solved] How can I found Easy method for this in C# Windows base Application [closed]

Which database are you using? SQL Server 2008 or higher? If yes then the answer by @user3353613 will be useful. If not then you can pass comma/pipe(|) separated checkbox values to a single parameter to your stored procedure and then you can split the values inside the stored procedure to get what you need. Hope … Read more

[Solved] What affects the time for a function to return to the caller. [closed]

The time returning from a function should be negligible. Most processors have the instruction for returning from a function optimized, usually one instruction. If you are returning an object via copy, the return time depends on the time required to copy the object. Essentially, a return from function involves obtaining the return address, then setting … Read more

[Solved] How to understand this C++ palindrome code?

Taking a look at the string constructor: … (7) template <class InputIterator> string (InputIterator first, InputIterator last); You can see it is possible to create a string via iterators. The rbegin/rend iterators are InputIterators that points to the reverse positions that they refer: rend() –>”My string”<– rbegin() That said, when you pass the rbegin() and … Read more

[Solved] Counting list of words in c++ [closed]

In this case there is usually used standard container std::map<std::string, size_t> For example #include <iostream> #include <string> #include <map> int main() { std::map<std::string, size_t> m; std::string word; while ( std::cin >> word ) ++m[word]; for ( const auto &p : m ) std::cout << p.first << ‘\t’ << p.second << std::endl; } You should press … Read more