Search:

Type: Posts; User: Tropod

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,122

    Is there more to this code? WordByte vs Wordbyte

    Is there more to this code?
    WordByte vs Wordbyte
  2. Replies
    2
    Views
    856

    Nested for loop & vector issue

    Hi,

    I can't seem to understand why this is not working as expected. The output from the two "couts" are different. Can someone please explain why?



    #include <iostream>
    #include <vector>...
  3. Replies
    5
    Views
    1,327

    In this instance better solution would be to pass...

    In this instance better solution would be to pass the variables, for example;



    void fee(int &a, int &b, int &c) // note pass by reference not value.
    {
    a = 1;
    b = 2;
    c = 3;
    }
  4. Thread: many forks

    by Tropod
    Replies
    1
    Views
    712

    Add your if statement as part of the for loop, or...

    Add your if statement as part of the for loop, or visa versa depending on what or the order your trying to test, making sure it is in same scope. You can do this with proper usage of braces.
  5. Replies
    11
    Views
    1,883

    Thank you everyone for response! Very helpful...

    Thank you everyone for response! Very helpful :biggrin:
    So now have the following pseudo code;



    class BASE
    {
    public:
    BASE() { };
    ~BASE() { };
  6. Replies
    11
    Views
    1,883

    Thanks for the replies :) What am I missing...

    Thanks for the replies :)

    What am I missing here?
    Works with pointer, but not iterator?



    class BASE
    {
    public:
  7. Replies
    11
    Views
    1,883

    Alrighty back to the drawing board then, I'm...

    Alrighty back to the drawing board then, I'm obviously missing something.
    Thanks for the reply :).
  8. Replies
    11
    Views
    1,883

    Thanks for the reply. How would one iterate...

    Thanks for the reply.

    How would one iterate through objects, given the following;




    class UI : public OtherClass
    {
    public:
  9. Replies
    11
    Views
    1,883

    class vector member template

    Hi,

    Can't seem to get my head around templates enough to get something to work the way I want.

    Essentially I'm trying to create a class member variable that can store other class objects.
    ...
  10. Replies
    1
    Views
    918

    Virtual controls

    Hi,

    Just wondering if virtual control is possible for something like (mfc) CEdit control? ie same thing as virtual list control, except an edit (or similar, combobox edit?) control.

    I'm looking...
  11. Replies
    2
    Views
    1,048

    whole char array into string as int

    hi,

    I'm wanting to find out a way to display/convert a whole char array or string into int, such that their hex values are displayed & not characters. I know how to do this, but I'm wanting to...
  12. Replies
    4
    Views
    5,139

    is there anyway to do this without copying?

    is there anyway to do this without copying?
  13. Replies
    4
    Views
    5,139

    hi thank you for the reply. Problem I'm...

    hi

    thank you for the reply.
    Problem I'm having is once I do following;


    fHandle.open(lpszPathName, std::ios::out | std::ios::in | std::ios::binary);
    std::stringstream ssbuffer;...
  14. Replies
    4
    Views
    5,139

    stringstream str() vs rdbuf()->pubsetbuf()

    hi,

    I've been toying with this & it doesn't seem to work.



    std::vector<char> vbuffer(filesize);
    fHandle.read(&vbuffer[0],filesize);
    stringstream ssbuffer;...
  15. Replies
    2
    Views
    1,098

    The data is not records based, it varies between...

    The data is not records based, it varies between all different sorts of file types. And the large(er) file(s) where it crashes, is 700MB~ or so.
  16. Replies
    2
    Views
    1,098

    string & stringstream issue/Q?

    hi,

    I'm trying to improve some file loading & have the following;



    fHandle.seekg(0,std::ios::end); ////fHandle is fstream.
    std::streampos length = fHandle.tellg();
    ...
  17. Replies
    8
    Views
    1,266

    That might be because %d is not used for char...

    That might be because %d is not used for char
    printf - C++ Reference
  18. Replies
    8
    Views
    1,266

    cout is for output, so yeah.

    cout is for output, so yeah.
  19. Replies
    8
    Views
    1,266

    get the number of letters in the file, or...

    get the number of letters in the file, or size/length of the string, store that in int & use that for a loop to print stars.

    i.e.


    int numberLetters = filename.size();
    for(int i = 0;...
  20. Replies
    3
    Views
    1,444

    I always find stuff like this article interesting...

    I always find stuff like this article interesting to read, even if it is way over my head :eek:
    The concept sounds good though.
  21. Replies
    8
    Views
    1,329

    ...indentation could do with improving. You...

    ...indentation could do with improving.

    You need to check the path/execution of your code. Looks like it is never able to reach
    while (num2==-1);
    which is why it can't exit.
  22. Replies
    3
    Views
    4,761

    Thanks for the reply! Was a little stuck but...

    Thanks for the reply!
    Was a little stuck but managed to figure it out from your post.



    vector<int> iVec(*iListArray,*iListArray+sizeof(iListArray) / sizeof(int));



    How would one...
  23. Replies
    3
    Views
    4,761

    vector push_back array

    hi,

    I've recently changed some code in my program from a multidimensional array to a vector, and I'm wondering if/how it's possible to initialise a vector array.
    i.e.
    vector<int> MyVector;...
  24. Replies
    14
    Views
    1,023

    So wait, now I'm (really) confused...

    So wait, now I'm (really) confused :confused:.......

    I currently have wxDevC++ 7.2.0.2 installed, with this issue. I also have another separate program/compile issue that I'm trying to deal with...
  25. Replies
    14
    Views
    1,023

    I realise that I can initialise/set the POINTS...

    I realise that I can initialise/set the POINTS that way. I was trying to understand why the book I was reading & another (old) thread I came across, specifically had it laid out like this, but wasn't...
Results 1 to 25 of 56
Page 1 of 3 1 2 3