Search:

Type: Posts; User: dxgalaxy

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    2,179

    Hi, already figured it out, wrote an example...

    Hi, already figured it out, wrote an example program:


    #include<stdio.h>
    #define row 3
    #define col 4

    int main(){

    int N,M,L,i,j,k, *p;
  2. Replies
    8
    Views
    2,179

    Ah, I wrote it in a hurry: In the example array:...

    Ah, I wrote it in a hurry:
    In the example array:
    0 0 0 0
    0 0 0 0
    0 3 0 0 <- p points to the cell with the 3
    0 0 0 0
    0 0 0 0

    It should become:
    0 0 0 0
  3. Replies
    8
    Views
    2,179

    *Sigh*, english isn't my native language, and I...

    *Sigh*, english isn't my native language, and I don't know very well how to translate computational terms.
    I showed an example of the array so I thought it wasn't necessary to clarify it was a 2D...
  4. Replies
    8
    Views
    2,179

    Moving a pointer inside an array

    Hi, I've a dinamically allocated array, which is filled with some data from a file, the array looks like this:
    0 0 0 0
    0 0 0 0
    0 3 0 0
    0 0 0 0
    0 0 0 0

    (dimensions may vary)

    My program...
  5. I see, this is pretty new to me. My lecturer is...

    I see, this is pretty new to me.
    My lecturer is always angry at us when we forget to make dimensions constant, I might use this to trim simple programs then, thanks for the reply :)
  6. What's wrong with this array declaration?

    Hi, I got an assignment of doing a program to make the sum, substraction, etc. of a matrix A and a matrix B of given dimensions (Via keyboard, via detection, any method was possible).

    I used...
  7. Replies
    11
    Views
    2,187

    Okay, I changed some lines with loops and got...

    Okay, I changed some lines with loops and got this :)



    #include <stdio.h>
    #include <stdlib.h>

    int main(){

    double value[5]={0,0,0,0,0};
  8. Replies
    11
    Views
    2,187

    Oh you're right :O I just deleted the keeper...

    Oh you're right :O I just deleted the keeper reset lines and initialized the array with zeros instead of '\0' 's :) it's my first time working a non-char array so I need to work on it.
  9. Replies
    11
    Views
    2,187

    Finished coding, and it works :D thank you for...

    Finished coding, and it works :D thank you for your help!

    #include <stdio.h>
    #include <stdlib.h>

    int main(){

    double value[5]={'\0','\0','\0','\0','\0'};
    double keeper;
    int num;
  10. Replies
    11
    Views
    2,187

    I searched and I found a function named qsort...

    I searched and I found a function named qsort which can sort the values in the array but I don't really understand how it works :( the examples I found run, but I still don't know how to adapt them...
  11. Replies
    11
    Views
    2,187

    Sorting an array

    Hi, I'm new in this forum and also new at programming :)

    I'm taking a C course at college but our lecturer is quite lazy, so we need to investigate most of the stuff. Currently, I'm stuck working...
Results 1 to 11 of 11