Search:

Type: Posts; User: fclopez

Search: Search took 0.01 seconds.

  1. Replies
    45
    Views
    5,220

    Thanks kmdv! Following your suggestion ...

    Thanks kmdv!
    Following your suggestion

    vec_th.at(ithresh).at(ichan).at(ipos);
    gives me

    terminate called after throwing an instance of 'std::out_of_range'
    what(): vector::_M_range_check
  2. Replies
    45
    Views
    5,220

    Thanks! I am using my actual code. Say I would...

    Thanks!
    I am using my actual code. Say I would like to access what I just pushed back....



    for(int ithresh=th_begin; ithresh<th_end+th_interval; ithresh = ithresh+th_interval) {
    ...
  3. Replies
    45
    Views
    5,220

    int iMax=50; int jMax = 20; const int kMax =...

    int iMax=50;
    int jMax = 20;
    const int kMax = 10;
    int x =5;
    int y;

    vector<vector<vector<int>>> someVector(kMax); //no complains here
    for (int i =0; i<iMax; i++) {
    for(int j = 0;...
  4. Replies
    45
    Views
    5,220

    int iMax=50; int jMax = 20; const int kMax =...

    int iMax=50;
    int jMax = 20;
    const int kMax = 10;
    int x =5;
    int y;

    vector<int> someVector[kMax]; // my problem is here....I want to create an array of array of vectors. How does one declare...
  5. Replies
    45
    Views
    5,220

    I want to complicate the story some more. How...

    I want to complicate the story some more. How does one write an array of array of vectors. Many thanks for the help!
    F.
  6. Replies
    45
    Views
    5,220

    Thanks for the comprehensive suggestions. How...

    Thanks for the comprehensive suggestions.
    How does one access an nth element of a vector in the array of vectors?



    //say 100th element of ivector = 5
    someVector[5][100]; // is this correct?
  7. Replies
    45
    Views
    5,220

    ok, consider the picture float x = 50.; ...

    ok, consider the picture


    float x = 50.;
    float y;
    for(int ivector = 0; ivector<20; ivector++) {
    vector<float> someVector_%d //my problem lies here
    /* here i want to generate 20...
  8. Replies
    45
    Views
    5,220

    my only problem is to concatenate someVector_...

    my only problem is to concatenate someVector_ with the integer in the for-loop, so that for instance I produce someVector_0
  9. Replies
    45
    Views
    5,220

    Create vector of floats in a for-loop

    I would like to produce five vectors via for-loop


    for(int i =0; i<5; i++) {
    vector<float> someVector_%d ;
    }

    so that i have
  10. appending integer to strings in a function vs concatenation

    I would like to concatenate strings and integers so that i produce something like this:


    char *path " = "/home/myFolder%d/run%d.raw"
    //where %d is a integer specifier


    so that I can use it...
  11. Thanks Jim. Thanks for pointing out the mistake...

    Thanks Jim.
    Thanks for pointing out the mistake in ext[].

    someFunction is part of a bigger for-loop so that when someFunction is called, it will do some more complicated for-loops. The idea is, I...
  12. concatenation of strings and integers then call into a function

    I have a very simple question. I would like to concatenate strings so that


    char *string0 = "/home/myComputer/someFolder/fileName_";
    char ext[4] = ".raw";
    char fname[256];

    int someNumber;
    ...
Results 1 to 12 of 12