-
Replied To a Post in polynomial
Programmer? Hell no. I'm a professional figure skater. -
Replied To a Post in Procedure of learning C++
 -
Replied To a Post in How to solve Coins problem in C
You can construct the value of any coin, using coins of lower value (if there are any); this makes the problem easier because the smallest amount of coins required is … -
Replied To a Post in Program for permutation of 1, 2, 3, 4, 5.
#include <iostream> #include <algorithm> #include <vector> #include <functional> using namespace std; /* Just a helper function that prints the contents of the vector, separated by a space */ void print_vector(vector<int> … -
Replied To a Post in Finding a string within a string (Needle and Haystack c++)
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <cctype> using namespace std; int main() { /* Assumption: substring may overlap. E.g: "aaa" contains "aa" two times. */ const string … -
Replied To a Post in Using an If-Else to see if the input is a String or an Int
#include <iostream> #include <string> #include <map> #include <algorithm> using namespace std; int main() { /* Looks like you want something like a bimap, which isn't in the STL */ /* … -
Replied To a Post in balanced paranthesis
#include <assert.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> #include <stdio.h> /******** Stack *********/ const unsigned STACK_INTIAL_ALLOC_SZ = 8; typedef struct { void* elems; /* The elements that are stored in … -
Replied To a Post in Length of string
For C-Strings you could take a look at the [cstring library](http://www.cplusplus.com/reference/cstring/), which contains a function named *strlen*. While you're not looking for a user-defined function, you could also define it … -
Replied To a Post in Magic Square game
> After its standardization , array size can be specified with a variable. While C supports [VLAs](http://en.wikipedia.org/wiki/Variable-length_array) since the C99 standard, C++ does not support them as can be read …
The End.