Hi, I have met a confusing problem.
For example, one square can have 5 states: labeled 1, labeled 2, labeled 3, empty, blocked.
They theoretically I could just use 3 bits to hold the information...
TheGreatCthulhu, thanks for helping me to explain this. Yes, i am using the "combined" form to represent
both input at once such that this could be used in the next steps of the alogorithm.
...
Sorry for the confusing part.
For example, for a boolean function, there are 4 inputs ABCD, one output K;
if for both the input patterns 1000 and 1001, the output is 1.
Then we say we 'dont care'...
I'm programming an algorithm which needs to operate on bits. I know C/C++ has bitset class. But it is not enough for
me. Because I also need to do the operation with x(don't care) bit...
Could you write a small example code showing me how to provide < operator for node_info?
Is that something called operator overload?
I will try to look up the book for that part.
Could any tell me what's the difference between the two kinds of sorting function listed below?
Do they all have nlogn time complexity? It looks like the later one is in the algorithm...
Hi all,
I have a small piece of code that I want to do a series of function of while(cin>>temp) kind of operation.
But if i input 8 and 9 then enter an non-integer number, the program run past the...
Hi All,
I want to write a func to generate all the permutations of L[1,2,3,4], once at a time and output it in an array...
For example, the first time the func called, it outputs a pointer to...
Thank you Eri523! That helps a lot!
But I met another problem with my code using getline(cin,temp);
I changed my code to this. The thing is, the first time in the do...while loop, everything is...
Thank you Drmmr.
But I still didn't get how to use push_back when you are dealing with a vector of class type.
For example, in my code, the class type has two private members 'price' and 'title'....
Hi all,
I built a class type 'books' which includes the title and the price of a particular book. And I want to use vectors to store all the books information I have. This code should be able to get...
Hi all,
When the following code is executed, we cannot input any string with white-space.
What if I actually want to input several words separated by white-spaces? How should I do that
Paul, I don't think it's because of the use of char[] or string type;
Because the same error still pointed to the constructor usage after I changed the type.
I still cannot figure out what's the problem...
I think I must have misused the default constructor... I did it following a youtube tutorial...
I attached the code from the tutorial and could you...