CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: bar_ba_dos

Search: Search took 0.05 seconds.

  1. Replies
    1
    Views
    758

    Copy 3D vector into another

    Hi I have the following function:



    void fillVectorWithNumbers(vector<vector<vector<double>>> &vI3)
    {
    const long dim1 = 10;
    const long dim2 = 16;

    vector<vector<vector<double>>>...
  2. Replies
    3
    Views
    971

    Defining vector in header file

    Suppose I have the following sample header file test.h



    #include "myCommon.h"

    class Test
    {
    public:
    Test();
  3. Replies
    3
    Views
    731

    Re: Vector problem in class

    Ah ok, thanks. I removed vI3 from fillVector. But how to solve it now? If it try to set the size in my header file (test.h) instead, it gives the errors:

    variable "dim1" is not a type name and for...
  4. Replies
    3
    Views
    731

    Vector problem in class

    Hi guru's,

    Suppose I have the following sample header file test.h



    #include "myCommon.h"

    class Test
    {
  5. Replies
    3
    Views
    772

    Is this class set up correctly

    Hi all, I am not working with C++ often so I would like your advise on the following class I created. Basically, upon creating an object of this class, the constructor should do lot's of stuff and in...
  6. Replies
    2
    Views
    641

    Pointer usage question

    Hi all,

    I am not too familiar in using pointers so I have some sample code to try something out (see below). The code is working fine and seems to do what it should do.

    My question - Is my...
  7. Replies
    6
    Views
    814

    Re: Class initialization lists

    So basically, if I would use


    const hObject dataObject_;


    (thus without the &), a copy is made. Correct?


    What exactly do you mean by disabling the copy assignment operator. How do I do...
  8. Replies
    6
    Views
    814

    Class initialization lists

    Hi,

    I have a general question. How do initialization lists work when creating an object. In the example below, I would like the private data member dataObject_ to be a reference to dataObject...
  9. Replies
    2
    Views
    1,586

    Nested map problems

    Hi,

    I have two questions regarding nested maps.

    I am working with a nested map like

    map < string, map <string, map < long, double > > > myMap

    This map is being created in one function and...
  10. [RESOLVED] Pushing back into a map< string, vector >

    Hi I have a map <string, vector<string> > looking something like:

    ["12%","45, 233.45"]
    ["56%","12.45, 67.12"]

    Now I need to add a number to the end, so the result is something like:
    ...
  11. Replies
    4
    Views
    1,181

    [RESOLVED] Searching through a CSV file

    Hi all,

    I am not programming in C++ quite often, but for a project I was asked to do something for a certain prject. My problem: search for a specific indices in a CSV file. I came up with the...
  12. Replies
    3
    Views
    676

    Array question

    Hi all,

    I have a 2D dynamic array defined in the usual way:



    double **myArray = 0;

    int myArrayRows = 12;
    myArray = new double *[myArrayRows];
  13. Re: Outputting value from vector< vector< string >* >

    Thanks for your comments and suggestions. I've got it working, although I've still got a problem: if I look at the output I see the following (I'll be using here the numbers of my example above),...
  14. Re: Outputting value from vector< vector< string >* >

    Thanks for the answer. See below for the full code. What I would like to achieve is to read a comma seperated file which could look like:

    2344.33,-234.23,856.22
    4.73,7658.76,244.89
    etc.

    So...
  15. Outputting value from vector< vector< string >* >

    Hi all,

    Suppose I have the following:

    vector< vector< string >* > :: data;

    How do I get the values from data? I used the following (see below) but it doesn't work. Does somebody know how to...
  16. Replies
    5
    Views
    647

    Re: Array problem

    Hi,

    but I would to have both columns in one array. So if I call my_array[117][0] = 0.23 and my_array[117][1] = 0.65. Where my_array can be a map? Would the following work:
    map < int, vector<...
  17. Replies
    5
    Views
    647

    Re: Array problem

    Thanks laserlight,

    But I'm not too familiar with maps and vectors. Any idea how to set this up?

    Bar_ba_dos.
  18. Replies
    5
    Views
    647

    Array problem

    Hi,

    I have the following table (example):

    116 0.45 0.55
    117 0.23 0.65
    118 0.22 0.66
    119 0.12 0.43
    120 0.34
    121 0.45
  19. Replies
    0
    Views
    565

    Comment on my code please!

    Hi Gurus,

    I have a comma seperated file which looks like:

    Iter,time,val1,val2,val3,...
    1,0,1.0,0.3,3.4,...
    1,1,4.5,0.2,0.7,...
    2,0,6.7,0.9,5.4,...
    3,0,1.0,0.3,3.4,...
    3,1,2.8,0.6,0.3,...
  20. Replies
    4
    Views
    846

    Nested class

    Hi guys,

    I am trying to learn the concept of nested classes so I wrote a little test program which can be found below. I have some questions about this one:

    1) Reading some literature on nested...
Results 1 to 20 of 20





Click Here to Expand Forum to Full Width

Featured