Ahhh, i did leave out that essential malloc()... But why use the . instead of ->?
Type: Posts; User: bluej322
Ahhh, i did leave out that essential malloc()... But why use the . instead of ->?
Hi. This code:
struct node {
int data[10];
};
int main()
{
I played around with it and i just realized the obvious, you can use a variable name in place of the file path.
char fName[50] = "/users/me/desktop/test.txt";
FILE *handle =...
Hi, i was wondering if there is a way to use a specifier in fopen() or another file opening function so that the file name can be variable.
I know this won't work (as far as i know), but this is the...
I commend your google prowess. Thank you.
Yes, i understand that. As far as my googling abilities go, i can't find a data size that can support 50-digit numbers. That's why i'm here; maybe in all of your infinite wisdom you can provide a...
soooooo, does anyone actually have a solution for this problem... or is everyone going to brush off the issue with ridicule
And i'm having the same problem with strtod() too...
#include <stdio.h>
#include <stdlib.h>
int main ()
{
char test[55] = "82738293728298329381",*end;
Hi, i'm using atof() in a larger program but the simple program below illustrates the same problem.
#include <stdio.h>
#include <stdlib.h>
int main ()
{
char test[55] =...
Hi, i'm writing a program that calculates the sum of all primes below a number x.
Here's the problem, when I find the sum of all primes below a large number, say 2 million, the program truncates...
Oh yeah, and how can i run executable files with C?
Oh, I'm sorry. I neglected to say that it has to go from the top left to the bottom right position of the matrix.
I am using an array, a multidimensional array. Yes, it is related but I'm not sure that it's identical.
Haha, i know, i really should.
I can put the data in a multidimensional array without a problem. The issue is calculating all paths and storing the data. Maybe i misunderstood what you're saying?
Could you show me an example of this?
I did just that.
The code below isn't complete, i realized that the path algorithm would only detect shortest routes adjacent to the current position, thus failing in the first example matrix in my...
You're right, I've used linked lists once but I didn't see the dynamic capabilities. In fact, the measly code below is all i have done with linked lists. What i don't understand is how i can declare...
Hi, my current C project is a program that looks at a text file with a matrix inside. The format of the matrix is like so:
1,2,5,6
5,6,7,8
1,8,7,9
1,1,3,2:
The matrix can be comprised of ANY set...
Hi, i have a few C questions that are nagging me:
1) Why don't I need to place a '&' before strings when using scanf()?
2) How can access individual characters in an integer? (e.g. - find the...
wow, that deserves a facepalm. Thanks!
Hi, i was wondering if there is a way to remove the element of an array. For example, in the following code i am using the one array to temporarily store multiple sets of data. The problem is that if...
Hi, i'm writing a fairly simple program that asks for input and prints out "|" for each occurrence of a character. Right now it can distinguish letters/numbers but once i try to get it to check for...
Yes, i implied that when i said "i neglected the fact that there is the null terminating character at the array index of strlen()".
I understand that it took the null character at the end of line...
yes, i neglected the fact that there is the null terminating character at the array index of strlen().
one question though, i tried adding the '\0' onto the end of nLine and it worked as...
thanks, i tried exactly what you suggested and it seems to be functioning.