Is there any source code of the game, bacause I cannot find any?
Type: Posts; User: vril
Is there any source code of the game, bacause I cannot find any?
You, guys, are awesome! At first, I couldn't figure out how the floodfill algorithm can answer my decision problem (whether there is a connected area on my board), but I came up with an idea: I could...
Are you sure? I could not find any function called "floodfill". Can you link me please? As I understand, this kind of code concerns graphics. Is it certain that it can also apply to my problem?
Hey everyone. I am trying to write a simple application that resembles the game "Computer Co", but I am stuck with this problem: If the board is represented by a dimensional array, with what...
How come? I had run it before and worked fine. How about that?
res="$( last | grep -v "wtmp" )
users="$( echo $res | awk '{print $1}' | sort -u )"
for user in $users; do
totmin=0
...
Sorry, you are right. $res holds the output of "last".
res=$( last )
Anyway, let's focus on the other problem now.
Hi. I am trying to copy a list of arguments that are separated by spaces and follow a specific flag (eg -l) to a string. How can I achieve that in bash? Thanks in advance.
Let's say there are the dates " April 1 and March 31". If I use sort in day number field to hold only one occurence of each date, March 31 will be put prior to April 1, which is wrong.
users="$( last | grep -v "wtmp" | awk '{print $1}' | sort -u )"
for user in $users; do
totmin=0
qq=$( echo "$res" | grep "$user" | grep -v "still logged in" | awk '{print $NF}' | sed...
Thanks a lot! Problem solved! Now I would like to deal with another problem if I don't bother. How could I show the number of sessions for the past 10 days? An approximation would be, at first, to...
No, it has to be in bash. Thanks anyway.
Thanks, but I need to find the total login time of every single user displayed by "last", not of particular one.
Hi everyone. I would like to write a script in bash that displays the total login time of every single user shown by unix "last" command, regardless of any different machines he connects from. How...
How do you compile for release? From Project-> Properties, as I have already done? Why, then, do I get the exact same error?
As a matter of fact, an executable file is generated in the Debug folder, which shows up an error window when I double-click it.
What do you suggest? Compile it as release? I changed the...
Well, I followed the steps, but I got the error "PDB 'vc90.pdb' was not found with 'BFLib.lib(BF.obj)' or at 'C:\Users\USER\documents\visual studio 2010\Projects\database\Debug\vc90.pdb'; linking...
How is it possible to insert a .lib file in Microsoft Visual C++? Thanks in advance.
Well, I had to test another compiler simply (Microsoft visual C++ 2010).
I am using the Dev C++. I have also provided the virtual functions implementations along with the child class definitions. I just removed them, when posting the code.
I have declared these classes, as below, but I get repeatedly the following compile errors. Could you explain to me what is wrong?
class A{
public:
virtual void f1();
};
...
I found it once again. It was because of advance(it, n), which result in deleting the end node of the list. I corrected it with advance(it, n-1).
You were right. For some reason assertion fails...
edit: I found it! When a passenger witout ticket disembarked, I forgot to decrement total passengers. I fixed it and the program doesn't crash...
I prefer to keep it as std::list<passenger *>. Is there any idea what causes the access violation and how it can be avoided?
I am not sure I fully understand you. How shall I implement the copy constructor and assignment operator of the waggon class and how does this relate to the access violation errors? Could you show me...
Since n ranges from 1 to number of passengers, therefore within the limits of the list, there is no need for such an assert. I used std::advance, but I still get access violation. :(