Maybe you should look back at some unrelated examples of for loops and such. When i say index I mean the variable you are using to increment the loop. There are a number of things wrong, but notably...
Type: Posts; User: BooBoo808
Maybe you should look back at some unrelated examples of for loops and such. When i say index I mean the variable you are using to increment the loop. There are a number of things wrong, but notably...
Yes, but the fact that you initialize the float exp to 0 after reading in the input from the user.
/* stores a float typed in by the user in exp */
scanf("%f", &exp);
/* iterates a loop...
Follow the programs logic; you are reading a value into exp and then initializing exp to 0 inside the loop.
Among some other things, take note that you are assigning a new value to result each...
Well, I actually got the program working after my blunders. Learned quite a bit in the process.
At first I thought debugging the program was going to be a nightmare, but then one simple fix gave...
Thanks for the replies though! However, I wish I would have realized what I was doing myself!
EDIT: Good info! Thanks again!
Well, the following test program results in the same warning. Here I am storing the result of the modulus operation on an unsigned long long, which on my system is 64 bytes.
#include <stdio.h>...
Hello all,
I have recently started to implement the SHA-256 checksum algorithm in C as an education exercise. I was moving along quite well until I reached the point where I needed to perform...
UPDATE:
Well, I finally found what I was looking for. I wanted to write a program that burns a compact disc. I just got quite confused because I jumped head first into digging through source code...
It would maybe be best to look at it from more of a mathematical perspective. After all, recursion is rooted in mathematics, as is most of computer science.
I am not saying you need to start...
May I recommend UNIX Network Programming (I am assuming some *nix) by Richard Stevens. It's a great book and has a whole chapter dedicated to raw sockets.
Also, posting more of your code would be...
Yes. I see that. The problem I am having is this.
I know I need to open() the device, and then write my data, but doing this as if it were another normal file does not work. I need to use a...
Thats the information I am after. A good reference for reading/writing to devices under the IDE/SCSI interface. Like I said, I am learning everything here quite slow since I am doing so much looking...
Well, I think that book as well doesn't go where I want.
It briefly mentions open(),read(),write() and related calls and their uses. I need to know how to use those same functions, but to properly...
I think I may have skipped over that one since it is so commonly title. Anyway, I looks like a good resource, plus its a free online book!
Hello everybody!
Well, I have been doing a lot of reading about the Linux kernel and am currently interested in writing some programs that perform low level block device IO. Specifically, I want...
Yea, well I am not the system administrator here so that becomes a chore. I did finally get my real program to work by just telnet'ing to a Solaris 8 box and compiling there. I was just trying to...
Ok, now I just compiled Beej's simple stream server, server.c. After fixing a single typo and comiling with -g I get the same thing when I try to launch gdb.
BTW, Beej's network programming guide:...
I know next to nothing about programming in windows but I am guessing usuallly some sort of shell processes the wildcard character in the file name.
Ok, here is some of the code. I intended to move onto a more complex project, but this Solaris bus error issues is holding me back.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>...
Well, lately I have been having a go at a simple client/server app on a Solaris 10 machine. So far, it hasn't been fun. Now I have been reading how picky Solaris can be with memory alignment, and I...
Is it just me or should this guy first pick up a book and then ask more detailed questions? I took two semesters of systems programming to learn low level hardware programming. And I am still a noob.
Just to get you started, you can do this. However, be careful not to overflow your buffers, as this below isn't the best way to do this, but it gives you and idea. It uses a fixed array, but I didn't...
#include <stdio.h>
int main() {
unsigned int x = 2147483648u;
printf("x = %u\n", x);
return 0;
}
I ran the above on my Solaris machine and got the following:
Then was the creat() function designed just to show CS students that a lot of things in CS don't make sense, like writing the word 'create' without the 'e'.
Har har har