Hello everyone,
As part of a University project, I'm developing a RTYPE-like game. Although, we are pretty much free to do it as we like, there are Platform and Library constraints. For example,...
Type: Posts; User: +Azazel+
Hello everyone,
As part of a University project, I'm developing a RTYPE-like game. Although, we are pretty much free to do it as we like, there are Platform and Library constraints. For example,...
Hello everyone!
Well, I'm currently writing a VOIP server in c++; and recently I've ran into a problem.
I'm having trouble thinking the 'c++ way'. What do I mean by that?
Its hard to...
Hey guys,
I have a DLL in which I declare and export a class. The problem is that this class inherits a base class that is not in the DLL. And as well as that, it implements virtual functions that...
Hey everyone!
I have written my own kind-of-custom-version of the stack container in the STL. The iterators seem to be working and the basic push/pop/size I did.
Now there is one thing that...
Alright, and in this case why does:
compare("string1", "string2");
call the compare (const T& a, const T& b) and not the:
compare<char *>(char* const & a, char* const & b).
string1 is a...
Hello everyone!
I have this interesting problem. Here is my code:
template <class T>
int compare (const T& a, const T& b)
{
if (a == b)
Yop guys,
I have this bizzare (to me) question. I have a simple class:
class Koala
{
public:
Not sure if this is what you need, but when my group and I were rewriting the command "top" this is what we used to see what processes are running/cpu they take/ram/etc.
#include...
If you are on Unix use
int unlink(const char *path);
To create my shell I used, the termcap library. Its standart for all terminals, and not to hard to work with.
http://www.gnu.org/software/termutils/manual/termcap-1.3/html_mono/termcap.html
while (x = 1)
You probably meant to say:
while (x == 1)
If you ever need to compare a fixed-length of characters in a string, you can use strncmp(); Its the same as strcmp but it takes a third argument, which is the number of characters to compare.
I think I know what you mean, but I dont think you could do it as you want it. You could use "|" to seperate the cols and "--" to seperate the rows but the rows would be abit far from each other.
...
Hey guys,
Im writing a sudoku game following this article:
http://norvig.com/sudoku.html
Im getting close, but Im having a problem with the "search" function.
Its:
def search(values):
Yep, I know that. I have already set the terminal into non-canonical mode + I know how to utilise Termcap. All Im really worried about is getting that line which the user will be modifying.
I know I know, but I still want to do it my way. I mean in the end its "my" project so I might as well redo everything. (+ you learn more, I think )
But thanks for the suggestion nevertheless ;)
yea, well you see the thing is:
for it to appear as the user types it, after each my_getchar I do a putchar of that character. Afterwards the user modifies the line, does some inserts or...
Aha I see. Yea I found some stuff on inserting/deleting characters with Termcap. I was wondering how would I keep track of the line that was typed? So that I can parse it afterwards.
edit: I also...
Hello guys,
Im almost finished with writing my own shell, but I have just one thing to finish off. Currently to get the line that the user types, I do a read(). But I want the user to be able to...
Hello guys!
I am writing my own shell, and while the basics are complete I came upon a problem.
At the current moment Im trying to implement multiple Pipes and redirections in my command line....
Hey guys! I think I must be going crazy...
int main()
{
float test = 48 / 512;
printf("%f", test);
return (0);
}
Sorry for bothering, I found the mistake. It was here:
vars->env[i] = &environ[i][0];
As far as I am guessing I was assigning the memory address of environ to vars->env so when I was freeing...
Hello guys! I have a problem with freeing allocated memory.
What I have is a structure called "vars" in which I have a char **env.
This env will contain all the environment variables of the...
Hello,
Im looking for a book that very well explains the concepts of mathematics in Graphics. Stuff like matrices, vectors, and how they are used in graphics. Also things like, ray-casting and...
Hey guys.
I seem to have a small problem.
I want to make a condition in the c preprocessor, that if it is a specific system I need to do something.
I have FreeBSD and SunOS. I need it to do:
...