Search:

Type: Posts; User: kasun

Search: Search took 0.01 seconds.

  1. Thread: Self - less

    by kasun
    Replies
    12
    Views
    3,575

    Self - less

    *
  2. Replies
    3
    Views
    8,800

    Thanks, gonna check STL algo soon. But for now,...

    Thanks, gonna check STL algo soon.
    But for now, please check whether the code is OK,
    'cause it doesn't prints correct values.

    Here's the whole thing:

    // header.h
    #include<vector>
    using...
  3. Replies
    35
    Views
    3,586

    I understand. But when I post that code, he was...

    I understand. But when I post that code, he was already figured out a code appropriate for his class. So I was only thinking of pointing out another way to do it, not telling to use that method, I...
  4. Replies
    35
    Views
    3,586

    Re: Re: Just an another common way to do (a)

    "The first element in the array is the 0th element, and the last element is the (n-1th) element, where n is the size of the array."
    - MSDN, Arrays.

    So, input[2] means actually 3 elements -...
  5. Replies
    35
    Views
    3,586

    >> did you even read the assignment? check his...

    >> did you even read the assignment? check his restrictions...

    At least "Uncertain" will learn something out of it, as I'm learning lots of things out of the questions and answers all you guys are...
  6. Replies
    35
    Views
    3,586

    Just an another common way to do (a)

    (a)

    #include<iostream>
    using namespace std;

    void Assend();
    int input[2];
    int i1,i2,i3;

    void Assend(){
  7. Replies
    3
    Views
    8,800

    Converting byte arrays to vectors

    I have function - Stash::add - to recieve any kind of value,
    and store that value as a byte array:


    int Stash::add(const void* element) {
    ........
    ........
    // Copy element into storage,...
  8. Replies
    1
    Views
    2,656

    byte arrays & vectors

    I have below program that acts like a stack. It receives a value, then takes 1 byte of that value at a time
    to store it byte-by-byte as an array of bytes. When the storage is full it dynamically...
  9. Thread: Better way

    by kasun
    Replies
    7
    Views
    1,169

    Better way

    What do you suggest as the better practice when coding a program?

    1.Figure out absolutely every little detail about the functioning of structures, classes, and functions, that goes inside the...
  10. Replies
    20
    Views
    5,490

    Thanks to axon I will be having nightmares like...

    Thanks to axon I will be having nightmares like Bill Gates chasing after me with huge BUGS in his hands!... Just kidding.

    Thanks a lot for all the posts. If anybody remember anything more,...
  11. Replies
    2
    Views
    1,704

    I’m so sorry… my mistake. Actually the code is...

    I’m so sorry… my mistake.

    Actually the code is meant to store the double value byte-by-byte in the function add. The print function is supposed to print all the values in storage, but it doesn’t...
  12. Replies
    2
    Views
    1,704

    Problem with storing and printing

    Please point out why below code is not working properly. The program is meant to store 25 doubles and print them out again to the console.

    // function add() of struct Stash, which adds values to...
  13. Replies
    20
    Views
    5,490

    poor windows user

    Hi!
    If Windows dosen't start or function properly because of missing or corrupted system files, how can I repaire Windows without formatting the disk and reinstalling the package?
    Thanks. Have a...
  14. Thread: Stack::push

    by kasun
    Replies
    4
    Views
    1,420

    Thanks. But, could you please be little more...

    Thanks.
    But, could you please be little more specific about how


    newLink->initialize(dat, head);

    points head to 5 and then


    head = newLink;
  15. Thread: Stack::push

    by kasun
    Replies
    4
    Views
    1,420

    Stack::push

    This is the struct Stack:



    struct Stack {
    struct Link {
    void* data;
    Link* next;
    void initialize(void* dat, Link* nxt);
    }* head;
  16. Replies
    2
    Views
    1,143

    Oh.. yes. I see my mistake. - Thanks

    Oh.. yes. I see my mistake.
    - Thanks
  17. Replies
    2
    Views
    1,143

    Little 'byte' of confusion

    When we say…


    &(charArray[index * sizeof(int)]);
    …to retrieve the address to an integer value that stored
    inside a byte array, how actually it gets pointed to that
    value? Isn’t we are only...
  18. Replies
    3
    Views
    983

    Yes, with that bit of code and using a...

    Yes, with that bit of code and using a nonproportional font I can make it.
    Thanks you guys a lot for your time.
  19. Replies
    3
    Views
    983

    Table Problem2-(a different code)

    Sorry to bother you all with a similar one as my previous.
    I wrote below program for the purpose of, first reading 2 files. Think of these 2 files as the 2 columns of a data table. That...
  20. Replies
    3
    Views
    1,354

    You are committing few errors here. (1) You...

    You are committing few errors here.

    (1) You defined variable char x to grab the user’s input. And then you check whether it’s ‘yes’ to continue with the program, right? But the word ‘yes’ is a...
  21. Thread: A Table Problem

    by kasun
    Replies
    2
    Views
    1,454

    Think that the ‘-‘ character isn’t a matter. Now...

    Think that the ‘-‘ character isn’t a matter. Now my problem is that, as you said, I’m writing more than the useful part of the arrays. So some invalid chars also gonna be written to fill up the rest...
  22. Thread: A Table Problem

    by kasun
    Replies
    2
    Views
    1,454

    A Table Problem

    I have a problem with a data table please help.
    Problem: I have this 2 .dat files called LFILE & RFILE. LFILE contains some names in an M number of rows.
    RFILE contains numerical values that match...
Results 1 to 22 of 22