Thanks for your help and quick responses.
We're suppose to be going by the book. One of the questions we have to answer using this program is how many terms of the series until you get your first...
Type: Posts; User: NoUse
Thanks for your help and quick responses.
We're suppose to be going by the book. One of the questions we have to answer using this program is how many terms of the series until you get your first...
Okay so like tabstop said, it looks like the book f-up the series by putting the negative on the wrong one. I also incremented by two and am getting better answers. here's the code:
double sum...
Alright I'm having lots of trouble estimating pi using this series. I must be missing something.
My book says you can estimate pi using this series:
pi = 4( 1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 +...
Hey muzihc, I can tell that you're in my same class. Gaudry definitely isn't the best teacher around, in fact, she's probably one of the worst! I really feel bad for all the people who don't have any...
Diablo I or II.. if you haven't played them you're missing out.
bahaha. Good catch.
Perhaps, you have a typo. Try
strcmp()
Although, there is a safer function
strncmp()
Yea, you're right. I probably should have reviewed the function. I assumed it would just need the file pointer.
[edit]
In the header "string.h" exists a function called strncpy. :)
strncpy(string2, string1, strlen(string1));
"./" solves everybody's problems. :)
Okay, you type the EOF character on your keyboard, then come back and talk to us. ;)
First off, main should ALWAYS return an int even if your compiler let's you get away with not returning it.
...
C doesn't dynamically allocate memory with new. Just as the guy above me said, main() has a return type of int, but I don't see anything being returned. ;)
If you have two different drives then partition magic isn't even needed. Just boot up with the linux cd and use cfdisk to partition your new drive.
Use partition magic to partition out about 5gb from your main Windows partition. Make your main linux partition around 4gb (as that's all you will probably need as you're just doing some programming)...
Yes, it is possible. Here's a good api tutorial that's in C:
http://www.winprog.org/tutorial/
Windows XP Pro: $79.99
Windows Server 2003 Standard with 5 CALs Academic: $349.00
A mini network of Windows XP Pro boxes...
Software development under Knoppix would not be fun. It's way too slow. You made the right choice dual booting.
Or just download and install a Linux distrubution that comes prepackaged with GCC and delete your Windows OS. Fight the power. :)
Most important thing to note: Main ALWAYS returns an int, even if your compiler lets you get away with it as void.
Secondly, you need to allocate memory for your pointer, else you're just over...
Depends on the parameters you pass to that function. But if pspDebugScreenPrintf() is similar to printf, it will be:
pspDebugScreenPrintf("%s cross.\n", c);
The Complete C Reference Fourth Edition. It's a good book that teaches well for newer programmers and it's also a great reference for more experienced programmers.
Easy way using command line arguments.
#include <stdio.h>
int main(int argc, char **argv)
{
if(argc != 2){
printf("Use: <%s> <word>\n", argv[0]);
return -1;
Resource comes from the exe.
Yea that's what I'm using. Check the code at the bottom of this post.
Why would it become invalid?
1812: ERROR_RESOURCE_DATA_NOT_FOUND :/
code:
Umm, thanks? But you don't know how long I've been studying that same msdn code :/ I still can't figure out the reason...