Well if you want to code GUI's and stuff, you have multiple opportunities:
- Win32 API: theForger's Win32 API Tutorial ;
- GTK Framework (platform independent) ;
- Qt Framework (platform...
Type: Posts; User: Ideswa
Well if you want to code GUI's and stuff, you have multiple opportunities:
- Win32 API: theForger's Win32 API Tutorial ;
- GTK Framework (platform independent) ;
- Qt Framework (platform...
I wouldn't recommend Microsofts IDE. Maybe for Win32 development it's nice, but you are a beginner and don't need that yet.
Netbeans C IDE is nice too. But your problems are probably solved with a...
A game maker, something like this: Game Maker - Wikipedia, the free encyclopedia ?
That is a good idea (but as you see, not new).
I think this is a great idea! But I may be a "someone" with less experience brewbuck is talking about :rolleyes:. I could take care of translation to dutch if necessary :p.
The sieve is memory-heavy though?
So you store primes in an array or something and when you check integer 'n' for primality you check if 'n mod x' != 0 where x are only primes you calculated before?...
Yeah, I printf() them. Without printing it's 1.8 secs. I have looked into wikipedia on Trial division - Wikipedia, the free encyclopedia, is that the algorithm you use? That is just the "brute force"...
Nice! I haven't used any of the fast prime algorithms yet. But I'm having a lack of time because I have my final exams in 17 days and I have to code some PHP websites too :p.
My time for primes from 2 to 1 Million is about 2.6 secs. ('real' return value from the 'time' command).
To improve your speed, you can, for example:
- break out of the inner loop when remainder...
Please read the homework policies here. If you don't do your homework, you will not learn to program properly. Maybe you could make something like a linked list implementation? That is pointers,...
Embedded system - Wikipedia, the free encyclopedia
Embedded C is used to program embedded systems.
Most Embedded systems have very primitive hardware (like 256 bytes RAM). Embedded programming...
Comments aren't compiled, they are ignored by the compiler, so you can't find them in the executable.
In your code, you only look for a single '/', but what if it isn't followed up by another '/'...
They probably mean remove the comments from the source code, not the executable?
You could make a linked list to store your string in. (Every node stores a char of the string).
You are using double quotes when comparing to a char. A char is in single quotes.
Well, you copy the string containing the date to a char *, which hasn't been allocated in memory. So that's a segfault.
makeDateString(&firstTry, buff); is correct.
Could you post the code where you call the makeDateString() function?
Indentation doesn't solve errors, it only makes the code more readable.
So what's the question? Let's try?
#include<stdio.h>
int main(int argc, char **argv)
{
printf("%c = %c", 'a'+2, 'c');
return 0;
Netbeans rules :-). Kdevelop is kinda "ugly" if you're in gnome, but has about the same functionality. For small tests or practice programs I use Geany. When I am using Qt I use QDevelop.
Visual...
Can't bit fields be used for this (making the int size smaller) ? Or is the struct making it larger again?
#include<stdio.h>
struct foo
{
int flag:2;
} bar;
C++ Reference [C++ Reference] is nice for this kind of questions.
Why do you need to pass it to a function if the object is declared globally?
myStruct test_struct;
A nice article about ++p in for() loops in the FAQ: Cprogramming.com - C/C++ Programming Tips and Tricks
You should use
u = x;
Because u and x are both pointers to pointers. x[2][2] is like **x.
By using * you dereference a variable (you get the value the pointer is pointing to).
By using &...
The memory you're writing to isn't allocated, so it's undefined.