Search:

Type: Posts; User: vegan

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,222

    Oh, right. Thank you very much laserlight and...

    Oh, right. Thank you very much laserlight and hk_mp5kpdw! I had no problem with C but struggling with C++ objects and classes/structs, cant still fully understand the concept.
  2. Replies
    6
    Views
    1,222

    Cool, thank you, I see now how I shouldve called...

    Cool, thank you, I see now how I shouldve called it. But now compiler says that listlines was not declared but it is part of List.h, I dont understand.
  3. Replies
    6
    Views
    1,222

    Thank you, yes it has to loop but how do I call...

    Thank you, yes it has to loop but how do I call Line display? This way -> Line.display() const; isnt working and lineStr should be std::lineStr?
  4. Replies
    6
    Views
    1,222

    How to call a function from another class?

    //Line.h
    const int MAX_CHARS = 6;

    struct Line {

    bool set (int n, const char* str);
    void display () const;

    private:
  5. Replies
    26
    Views
    2,268

    off to bed.. thanks again you all)

    off to bed.. thanks again you all)
  6. Replies
    26
    Views
    2,268

    suppose it is a long array and there are more...

    suppose it is a long array and there are more than 7s. so say 01001 7 1010 7 01100 (i use spaces for clarity) supposed to be the same as 01001[000]1010[0000]01100[000] i.e. every time it hits 7 it...
  7. Replies
    26
    Views
    2,268

    thanks andrew and thank you all for trying))

    thanks andrew and thank you all for trying))
  8. Replies
    26
    Views
    2,268

    7 is just a number it doesnt mean chunks of 8. 7...

    7 is just a number it doesnt mean chunks of 8. 7 could be 3 or 4 as long as it not 0 or 1. yep, the code exits the loop because the rest of numbers supposed to be 0 so im not adding them cos...
  9. Replies
    26
    Views
    2,268

    yes quzah, i actually have three for loops, (1)...

    yes quzah, i actually have three for loops, (1) entire array (2) chunks of 8. (3) when it hits 7. thats not the problem. i dont think anyone gets the problem. you think i just need to go through the...
  10. Replies
    26
    Views
    2,268

    the for loop must stop at 7, convert whatever 0s...

    the for loop must stop at 7, convert whatever 0s and 1s it collected, reset and start again after 7. if you skip 7 and continue converting then its gonna give a wrong output.

    say first 8 is...
  11. Replies
    26
    Views
    2,268

    im sooo damn tired. all day at school finishing...

    im sooo damn tired. all day at school finishing stupid ms server 2008 case study. whyyyyyy do i have to take this useless server course????? now i have no time for programming.
  12. Replies
    26
    Views
    2,268

    thanks andrew, but as i said that is not the...

    thanks andrew, but as i said that is not the problem, my original loop kinda does that. the problem is when the for loop hits number 7.
  13. Replies
    26
    Views
    2,268

    yea, i also kinda know what to needs to be done....

    yea, i also kinda know what to needs to be done. the problem is with the actual code. i just learned arrays and strings two weeks ago, and i had no time to practice them.
  14. Replies
    26
    Views
    2,268

    what about this? i think i got the logic? but...

    what about this? i think i got the logic? but still needs tuning...?



    if (array_01[m-1]==7){
    m++;
    for (n=0; n<8-p ;n++){
    word[p+1]+=array_01[m]*d;
    m++;
    d=d/2;} printf("printing word -...
  15. Replies
    26
    Views
    2,268

    i-k supposed to represent the size of array....

    i-k supposed to represent the size of array. array01[34] is an example.
  16. Replies
    26
    Views
    2,268

    How?

    How?
  17. Replies
    26
    Views
    2,268

    Help me with the loop plz ?

    say i have an array of integers:


    int array01[34] = {0,1,0,0,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,0,1,7,0,0,1};
    int word[10];
    int d=128, j=0, m=0, k=0, n=0;

    for...
  18. Thank you!! Saved me two hours)

    Thank you!! Saved me two hours)
  19. yep, they do look familiar. things like int...

    yep, they do look familiar. things like int fprintf(FILE *stream, const char *format, ...) easy for you to understand but not for me)) yet. what .... supposed to mean? i would have to spend a couple...
  20. yep, you are right. if i had time i would find a...

    yep, you are right. if i had time i would find a better way to do it and i will def look into it but i need to submit my assignment soon and i also have a bunch of other assignments and stupid essays...
  21. Thank you guys once again, I've searched half the...

    Thank you guys once again, I've searched half the internet looking for fscanf and fgets examples and couldn;t really find one that would help me. i just realized i shouldve prob searched for...
  22. Thanks a lot TheBigH. if you made it work, then i...

    Thanks a lot TheBigH. if you made it work, then i should be able to make it work too. thanks everyone! PS. found the problem
  23. semicolon is there in my original code, compiler...

    semicolon is there in my original code, compiler compiles everything fine. it just doesn't print the string. for loop isnt working, it should work with or without \n in printf which is just to test...
  24. thats not a problem, suppose it opened correctly....

    thats not a problem, suppose it opened correctly. for loop is a problem...
  25. How to read from a file line by line and store lines in separate arrays?

    say the file contains:
    890809
    8989
    1343434324
    4738294

    im trying to read line by line and store each into separate arrays. not working...
Results 1 to 25 of 29
Page 1 of 2 1 2