Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
39% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
3 Commented Posts
0 Endorsements
~7K People Reached
Favorite Forums
Favorite Tags
c x 17

8 Posted Topics

Member Avatar for Soileau

I am getting many many warnings of this kind in my code. It comes every time I typecast something in my code, which I am doing to variable addresses in order to use integer arithmetic on them. How do I fix these warnings? Thank you! I would appreciate any constructive …

Member Avatar for gerard4143
0
1K
Member Avatar for Soileau

Hey DaniWeb. I am getting stuck in an infinite loop when I input a character instead of an integer during a scanf("%d"....); I know this is because C doesn't provide any built in error checking. I know I can fix this by using getchar() in place of scanf, and changing …

Member Avatar for Dave Sinkula
0
4K
Member Avatar for Soileau

I am getting a seg fault when I try to run this code. The compiler is also giving me odd warnings about how an integer constant is too long for "long" type. Here is the code: Declarations [CODE] #include<stdio.h> #include<string.h> #include<stdlib.h> void printstates(){ printf("Enter the number for the corresponding state:\n\ …

Member Avatar for Soileau
0
131
Member Avatar for Soileau

I am getting all sorts of incorrect type warnings when I compile the following code: [CODE]// hw1.c // Josh Soileau // 1/19/10 // Program: Asks / stores info on a bank // #include<stdio.h> int main(){ char name[25] = "blank", rating[25] = "blank", state[25] = "blank"; int lobbyists=0, prevemploys=0, number=0; double …

Member Avatar for WaltP
0
180
Member Avatar for Soileau

I am very very blurry about when to use pointers or not. I am writing a function (given below), and trying to pass in two variables, statenumber and state. I have them being passed in as chars, and not char *s. I get error messages both ways. I dont know …

Member Avatar for gerard4143
0
136
Member Avatar for Soileau

I am trying to write a function to add two arrays. The catch is that the arrays have to parts of a structure. So here is what I have so far: [CODE]#include <stdio.h> struct poly { array1[]; array2[]; length; }; void polyadd(int array1[],int array2[],int length) { int i; struct poly …

Member Avatar for dan63043
0
126
Member Avatar for Soileau

[CODE]#include <stdio.h> struct poly { int len; int arr[]; char *name; }; int main() { int i; struct poly p; p.len = 45; p.arr[3] = {1,1,1}; p.name = "Josh"; printf("%d",p.len); for(i = 0; p.arr[i] != NULL ; i++) printf("%d",p.arr[i]); printf("%s",p.name); return 0; } [/CODE] I tried to make a simple …

Member Avatar for Mathura
1
169
Member Avatar for Soileau

I am trying to implement my own atoi function, and I am supposed to pass my variables in after ./a.out. Here is my code: #include <stdio.h> #include <stdlib.h> int myatoi(char array[]) { int sum = 0; int i = 0; while(array[i] != '\0') { int number = array[i] - '0'; …

Member Avatar for lipun4u
-1
224

The End.