Forum: C 15 Days Ago |
| Replies: 1 Views: 224 You can just
fopen("file", "w");
to create the file if it doesn't exist.
You can also try checking if a file exists using dirent.h on *nix, check this out:... |
Forum: C 15 Days Ago |
| Replies: 2 Views: 184 I once made a small kernel just for pure fun. It was very poor and I can really advise you on just one part of it.
> Memory management
You can use parts (or whole) code from this site: ... |
Forum: C 18 Days Ago |
| Replies: 1 Views: 337 I had once held a small project for Linux but that was a few months ago, and I hardly remember anything since it was my last project which I wrote for Linux. I mostly program for Windows now, but I'm... |
Forum: C 18 Days Ago |
| Replies: 2 Views: 259 In my opinion, creating merging the arrays and then sorting the merged array isn't a bad idea because it's simple. But that depends on what you seek - performance or simplicity. Everything is... |
Forum: C 20 Days Ago |
| Replies: 9 Views: 356 Can you paste the errors you get? And possibly more code?
By the first look I can advise to use pointers instead of int seat[][][][]. |
Forum: C Mar 14th, 2009 |
| Replies: 11 Views: 868 There are several ways to develop key loggers on Windows. I'll list them in order worst to best:
1. You could GetAsyncKeyState() from W32 API in a loop, but I guess most of the anti-viruses would... |
Forum: C++ Feb 17th, 2009 |
| Replies: 7 Views: 459 I'll tell you how to get the strReverse() done. Since this is a home assignment I'll only tell you how you could do it.
First of all you need to decide whether you want to do it the string or char... |
Forum: C++ Feb 17th, 2009 |
| Replies: 7 Views: 459 Public is missing a colon, and get() method should look like this:
long get () const { return x; }
Why do you need set method to be const anyway? |
Forum: Assembly Feb 2nd, 2009 |
| Replies: 1 Views: 598 Hello everyone,
I started learning assembly yesterday. Yes maybe I chose a wrong guide but I have a little problem here. It's about getting some integers without a newline. That is probably very... |
Forum: C++ Jan 30th, 2009 |
| Replies: 2 Views: 706 You can do this by passing a pointer to char or a string.
#include <string>
void yourFunction(const char * filename); //we don't want to modify so it's const
void yourFunction(string filename); |
Forum: C++ Jan 30th, 2009 |
| Replies: 3 Views: 254 You might want to try something like this, but yes it uses more CPU and memory.
#define YOUR_ARRAY_SIZE 256
#include <string.h>
char * getName(){
char buf[YOUR_ARRAY_SIZE];
... |
Forum: Geeks' Lounge Jan 24th, 2009 |
| Replies: 1,380 Views: 147,434 Some plov and a glass of coke.
Plov is like a russian meal containing rice, grated carrots and meat cut into chunks.
http://www.gumbopages.com/food/russian/plov.html |
Forum: C Jan 24th, 2009 |
| Replies: 3 Views: 398 Yes, I expected to get an error, but didn't get one.
What I'm trying to accomplish:
"What I'm trying to do is to prevent some code using functions in a header."
It may be lacking something like... |
Forum: C Jan 23rd, 2009 |
| Replies: 3 Views: 398 Hello,
I had no idea which title I should have chosen. Anyway, I'll try to explain my problem.
What I'm trying to do is to prevent some code using functions in a header. This problem causes... |
Forum: C Jan 5th, 2009 |
| Replies: 2 Views: 760 It worked! I can't believe it was so simple :)
Output:
wrapper
wrapper zakonczyl dzialanie!
Thanks a lot! |
Forum: C Jan 5th, 2009 |
| Replies: 2 Views: 760 Hello,
I'm quite new here, but there's a problem that needs solution. I think the title says exactly what I want to do. I need to use C for a reason I don't think is this important to mention. I... |