I found his Borland C++ complete reference for 3 quid. Thought it was very cheap for a programming book, now I know why. Haha
Type: Posts; User: Davey_R
I found his Borland C++ complete reference for 3 quid. Thought it was very cheap for a programming book, now I know why. Haha
I suppose you could neaten up the calling of the function slioghtly by using a variable argument list.
This uses <stdarg.h>, is that what you meant by external header file??
The down side is...
I don't think that this is suitable for what you want to do. The reason being, that this gives you permutations. For example, putting in abc, you would get (in some order):
abc
acb
bac
bca
cab...
Not sure if this is the only error because I don't use scanf() and printf() much because I mainly do embedded stuff, but the line before the while should be
&source[i-1].
str is a pointer so...
Thanx for your thoughts Emmanuel!
That was pretty messy code I agree. I started thinking about the second bit of my answer before finishing the first, and didn't pay much attention to its...
Off the top of my head, have an integer for each type of bracket, ({[, and increment it when you find an open one, or decrement it if you find a closed one.
#include string.h
int square=0,...