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 <<...
Type: Posts; User: coffee_cup
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 <<...
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;
};
thx ALOT for that, great info =)
never heared of copy constructors & assignment operators, will look into it :D
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...
thx for the help all :)
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:
oh I see... would this work?
typedef struct{
int amount[10];
int added[10];
} item;
[.....]
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...
I use the array as hash table to store an id though :/
I however need to store multiple datasets for every id
heya,
basic question:
Array given with say 10 entries:
array[0] = id1;
array[1] = id2;
etc...
thanks soooo much :D
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...
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 ...
Thanks all for the input ^^
Nice, that should do the trick, thx a ton :)
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...
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()
{
nice tip! and thanks all for the help! :) learned alot in this thread
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...
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;
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>
thanks ^^ solved the issue
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...
solution: added
code[inputcount] = 0;
to overwrite the \n. This probably isn't the best solution but working for now ^^
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...
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;...