Search:

Type: Posts; User: peterderijp

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    3,992

    It should be something like: i know the length ...

    It should be something like:
    i know the length




    void rotation(node** n){
    int length = 3;

    temp = (struct node *) malloc(sizeof(struct node));
  2. Replies
    5
    Views
    3,992

    Wel, that's difficult. With array i should do it...

    Wel, that's difficult. With array i should do it like this:

    i will calculate the length, and than:


    char temp = number[0];
    for(int i=0; i<length-1; i++){
    number[i] = number[i+1];
    }...
  3. Replies
    5
    Views
    3,992

    Rotate Linked list

    Dear All,

    i try to rotate my linked list. I have a linked list with for example the number 197, where each link contains one number.

    Now, i have 197. But i want to rotate that like 971 and 719....
  4. Replies
    1
    Views
    1,045

    Link List problem

    Dear Programmers,

    i have a linked list problem. I have have a number, for example 197, and put it in an array----> [0] = 1 , [1]=9, [2]=7

    So far so good. Now, i want to make a linked list of...
  5. Replies
    6
    Views
    1,035

    oh yes, you're right. I make a c program. But i...

    oh yes, you're right. I make a c program. But i coudn;t find a good compiler, that's why i use visual c++ (do you otherwise know a good and simple one? )
  6. Replies
    6
    Views
    1,035

    Thanks for your answer. I have 5 compile errors,...

    Thanks for your answer. I have 5 compile errors, but i suppose it's because i have a c++ compiler...
  7. Replies
    6
    Views
    1,035

    Linked List problem

    Dear Programmers,

    i have a problem with linked lists. I have an character array. This will look like this:

    array[0] = 1
    array[1] = 4
    array[2] = 8

    Now, i will make an structure:
  8. Replies
    15
    Views
    11,381

    oh sorry, now i try to get used to the...

    oh sorry,

    now i try to get used to the fundamentals of the assignment i have to make. I have to make an assignment with more than thousends of words. But i want to get used to the fundamentals of...
  9. Replies
    15
    Views
    11,381

    I also have to use dynamic allocation using...

    I also have to use dynamic allocation using malloc. But now i make an array, which will take a lot of memory. I think that will give some problems.

    I think i undestand what you're doing. But i...
  10. Replies
    15
    Views
    11,381

    input = fopen("C:\\month.txt" , "r"); ...

    input = fopen("C:\\month.txt" , "r");

    //check if we can access the file, if not, return 1
    if( input == NULL ){
    printf ("cannot open file");
    return 1;
    }

    char c = '0';
    while((c...
  11. Replies
    15
    Views
    11,381

    that's because i use the Visual C++ compiler i...

    that's because i use the Visual C++ compiler i though
  12. Replies
    15
    Views
    11,381

    so, i need to put one line in an array, then use...

    so, i need to put one line in an array, then use the strtok function to put the different substring in another array?
  13. Replies
    15
    Views
    11,381

    but how to implement this with a textfile... ...

    but how to implement this with a textfile...

    now i have



    #include "stdafx.h"
    #include <stdio.h>
    #include <string.h>
  14. Replies
    15
    Views
    11,381

    if i have something like: char *ptr;...

    if i have something like:




    char *ptr;
    char str[]="Testing,testing0,testing1,testing2,testing3,";
    ptr = strtok(str, ",");
  15. Replies
    15
    Views
    11,381

    Split a textfile in an array

    Dear Programmers,

    i have a question about splitting a textfile into an array. I have an textfile month.text which look like this:
    ...
  16. Replies
    3
    Views
    3,516

    if i think in the way as i as a human did: 1....

    if i think in the way as i as a human did:

    1. start with low to hight (element1-element2-element3-element4)

    2. element 1 & element 2 stays the same, interchange element 3 & element 4

    3....
  17. Replies
    3
    Views
    3,516

    Random char Array

    Dear all,

    i want to randomize the numbers of a char array, like:

    if a have a number 1234. With the function itoa i will have an array like this:
    a[0] = 1;
    a[1] = 2;
    a[2] = 3;
    a[3] = 4;
Results 1 to 17 of 17