Search:

Type: Posts; User: coffee_cup

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. hm one final question: sounds quite simple, but...

    hm one final question:
    sounds quite simple, but how can I actually get the position or value of the iterator of my vector struct?

    for instance

    if (found)
    std::cout << *it <<...
  2. Searching string within vector struct C++ 11

    Hello,

    new to C++ lambda, got two question in regards of searching for strings within a vector struct.

    Minimalistic example:

    struct singleFile {
    std::string filename;
    };
  3. Replies
    16
    Views
    1,987

    thx ALOT for that, great info =) never heared...

    thx ALOT for that, great info =)

    never heared of copy constructors & assignment operators, will look into it :D
  4. Replies
    16
    Views
    1,987

    hm I have a new issue... with initializing...

    hm I have a new issue... with initializing structs in a class :/

    instead of using arrays inside structs, I went for a structarray now.

    all I want to do is initialize the struct so I can use it...
  5. Replies
    16
    Views
    1,987

    thx for the help all :)

    thx for the help all :)
  6. Replies
    16
    Views
    1,987

    because I just started with c++ ^^ can I declare...

    because I just started with c++ ^^ can I declare an array of structs with new too?



    I mentioned in post above what I try to accomplish ^^
    quote:
  7. Replies
    16
    Views
    1,987

    oh I see... would this work? typedef struct{...

    oh I see... would this work?


    typedef struct{
    int amount[10];
    int added[10];
    } item;

    [.....]
  8. Replies
    16
    Views
    1,987

    basically I have an item name and id. I have a...

    basically I have an item name and id.

    I have a hashtable in which I store the id. I access the id with a hasfunction on the name which returns the index.

    now for every single item I have to...
  9. Replies
    16
    Views
    1,987

    I use the array as hash table to store an id...

    I use the array as hash table to store an id though :/
    I however need to store multiple datasets for every id
  10. Replies
    16
    Views
    1,987

    multiple attributes in arrays

    heya,

    basic question:

    Array given with say 10 entries:
    array[0] = id1;
    array[1] = id2;
    etc...
  11. Replies
    2
    Views
    8,756

    thanks soooo much :D

    thanks soooo much :D
  12. Replies
    2
    Views
    8,756

    Realloc on char**

    Hey!

    Could you please show me how to correctly use realloc on an array of char arrays?

    Say I want to store strings in arrays (=array of char arrays) and double the size of max. strings (y...
  13. Replies
    18
    Views
    7,102

    ok so I can get realloc work for a 1d array. ...

    ok so I can get realloc work for a 1d array.

    but I'm fully confused with 2d arrays...

    this is waht I need:
    array[n][255]
    while n iterates every single time a new line is read via ...
  14. Replies
    18
    Views
    7,102

    Thanks all for the input ^^ Nice, that...

    Thanks all for the input ^^



    Nice, that should do the trick, thx a ton :)
  15. Replies
    18
    Views
    7,102

    U guys don't know puffer? :) 12598 Anyways,...

    U guys don't know puffer? :)
    12598


    Anyways, thanks for the info, I will go with idea #1 then.

    I can't think of a solution of the mentioned issue though: how can I set a dynamic size of my...
  16. Replies
    18
    Views
    7,102

    alphabetically sort textfile

    Heya,

    I need to alphabetically sort a textfile and store the ordered result in another textfile.

    How can this be solved?

    #define LENGTH 255

    int main()
    {
  17. Replies
    11
    Views
    1,412

    nice tip! and thanks all for the help! :) learned...

    nice tip! and thanks all for the help! :) learned alot in this thread
  18. Replies
    11
    Views
    1,412

    Forgot about the leak, thanks! Please specify...

    Forgot about the leak, thanks!

    Please specify the mentioned concerns:

    Hm did I misuse pointers with char arrays in some way? Or did you just mean that this prog could have been done without...
  19. Replies
    11
    Views
    1,412

    thx alot u guys rock :) it seems to work now! ...

    thx alot u guys rock :) it seems to work now!


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

    char* selectLower(char* s);
    int count=0;
  20. Replies
    11
    Views
    1,412

    char pointers/app won't work

    Heya,

    trying to figure out pointers, can't get the following simple app work:

    all it should do is print the lower letters of a given string


    #include <stdio.h>
    #include <stdlib.h>
  21. Replies
    2
    Views
    900

    thanks ^^ solved the issue

    thanks ^^ solved the issue
  22. Replies
    2
    Views
    900

    Change order of list

    Heya!

    Right now my program displays the last element very first and the first entered element last.

    What would the most simple approach to reverse the current order of the list, by either...
  23. Replies
    14
    Views
    9,615

    solution: added code[inputcount] = 0; to...

    solution: added
    code[inputcount] = 0;
    to overwrite the \n. This probably isn't the best solution but working for now ^^
  24. Replies
    14
    Views
    9,615

    Thanks alot for the explanation! :) I will...

    Thanks alot for the explanation! :) I will rebuild my code once I got the root issue resolved, as I fear it would be the same even recoded:

    in the source code posted in #5:

    if (codes[i].code...
  25. Replies
    14
    Views
    9,615

    thanks a ton twomers :D small question: if I...

    thanks a ton twomers :D

    small question: if I want to ensure that the full string consists of signs with no numbers in them, I'd still have to loop through every char with

    for (int i=0;...
Results 1 to 25 of 38
Page 1 of 2 1 2