Forum: C Sep 30th, 2007 |
| Replies: 6 Views: 783 Thanks! it's working now. It makes sense: before I only gave one element as an argument, but instead I had to give an array with starting address &patom[0]. Now all variables in the struct are kept... |
Forum: C Sep 30th, 2007 |
| Replies: 6 Views: 783 Now it's like this:
void initialpos(struct atom *name, int N)
{
int i;
for (i = 0; i < N; i++)
{
name[i]->x=drand48()*20; |
Forum: C Sep 30th, 2007 |
| Replies: 6 Views: 783 I tried changing the function like that as well; but it still doesn't work.
Maybe I'm silly, but I just don't see it.
(and thanks for helping)
void initialpos(struct atom *name, int N)
{... |
Forum: C Sep 30th, 2007 |
| Replies: 6 Views: 783 Hello,
i'm still trying to learn C, and I have a new question ;).
I want to declare a struct, and use a function to manipulate the entries. If I change the values within a function it's ok;... |
Forum: C Sep 21st, 2007 |
| Replies: 2 Views: 4,884 Wow... that's fast and correct ;). Thans a lot! |
Forum: C Sep 21st, 2007 |
| Replies: 2 Views: 4,884 Hello,
Since you all helped me so well the previous time, I have a second question for you. I think it's fairly simple, but for some reason I can't find the answer.
I want to write to a... |
Forum: C Sep 10th, 2007 |
| Replies: 9 Views: 1,597 That's alright ... We all have our hiccups ;). |
Forum: C Sep 10th, 2007 |
| Replies: 9 Views: 1,597 I started learning C++ a long long time ago (never finished it though), but just started learning C with a tutorial. The tutorial is not very elaborate, and I didn't know i could use cin cout as well... |
Forum: C Sep 10th, 2007 |
| Replies: 9 Views: 1,597 Thanks. It's a bit silly I didn't think of it ... Well, now I'll never forget ;).
Thanks a lot to all of you; not only for this thread, but in all other threads you helped people. Much appreciated! |
Forum: C Sep 10th, 2007 |
| Replies: 9 Views: 1,597 Thank you both for your answers! They were very useful.
Now I have another problem (after that, I'll try to be quiet ;) ).
#include <stdio.h>
int main()
{
printf("Multiply two square... |
Forum: C Sep 10th, 2007 |
| Replies: 9 Views: 1,597 Hello,
I've just started learning C, and now I have a problem (and I couldn't find a solution on the interweb ;) ).
I want to multiply two matrices (2x2). First it 'reads' two matrices, and... |