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

Search:

Type: Posts; User: larry burns

Page 1 of 2 1 2

Search: Search took 0.03 seconds.

  1. No such file or directory for 3rd party software

    ff
  2. Undefined reference - so I have to edit the Makefile?

    ...
  3. Segmentation fault with vectors and iterators?

    I am working on very large code.
  4. Replies
    2
    Views
    1,204

    Having problems with objects and classes

    hi, I'm having problems with the code below. Can someone help me? When I run the program, I am unable to get the output of GetMissile, GetLaser,.. Also, instead of displaying the correct 'prices'...
  5. Replies
    3
    Views
    822

    Preparing for C++ job interviews

    I graduated from college a few years with a degree in a STEM field, but I am now looking for entry-level work as a software engineer. Currently, I only know C++ but I am also interested in learning...
  6. Re: Having trouble with passing array of pointers to functions to other functions

    code continued..




    void KaibaBattleFunction(vector< vector<Card> > &Field, int MonsterCard, int MonsterToAttack, vector<Card> &KaibaGraveyard, vector<Card> &YugiGraveyard, int& KaLP, int&...
  7. Re: Having trouble with passing array of pointers to functions to other functions

    code continued..




    void DrawForKaiba(vector<Card> &KaibaHand, vector<Card> &KaibaDeck)
    {
    KaibaDeckSize = KaibaDeck.size();
    cout<<"BEFORE you draw, there were "<<KaibaDeckSize<<" cards left...
  8. Re: Having trouble with passing array of pointers to functions to other functions

    #include <stdlib.h>
    #include <windows.h>
    #include <ctime>
    #include <cstdlib>
    #include <iostream>
    #include <vector>
    #include <string>

    using namespace std;
  9. Re: Having trouble with passing array of pointers to functions to other functions

    The entire code is too long to post here. I only included part of the code, since I didn't think alot of it was relevant. But I'll post more of it if you want to see it



    #include <stdlib.h>...
  10. Having trouble with passing array of pointers to functions to other functions

    I'm getting the error for the following code "error C2664: 'KaibaMainPhase' : cannot convert pa rameter 1 from 'void (__cdecl *[2])(std::vector<_Ty> &,std::vector<_Ty>...
  11. Replies
    1
    Views
    1,186

    Re: deleting element in 2d array?

    Never mind I figured it out
  12. Replies
    1
    Views
    1,186

    deleting element in 2d array?

    I want to delete an element in a 2d vector, say [1][1] in "Field", which is a 4x5 vector

    I tried

    Field.erase([1][1]);

    I know that for a 1d vector, I would just do

    Field.erase...
  13. Replies
    4
    Views
    1,092

    Re: classes objects and strings

    Thanks for the help. I made the changes but now I'm getting these errors

    error C2039: 'GetName' : is not a member of 'std::basic_string<_Elem,_Traits,_Ax>'

    for



    void...
  14. Replies
    4
    Views
    1,092

    classes objects and strings

    I try to run the following, but I keep getting the error "error C2664: 'Card::SetName' : cannot convert parameter 1 from 'const char [23]' to 'char'"

    I also got the following error;
    error C2664:...
  15. Replies
    3
    Views
    2,948

    Re: error LNK2019 unresolved external symbol

    when I changed the declarations so that I declare the functions with reference as an argument instead, I get these error messages



    error C2664: 'Beginning' : cannot convert parameter 1 from...
  16. Replies
    3
    Views
    2,948

    error LNK2019 unresolved external symbol

    I keep getting these error messages:

    "error LNK2019: unresolved external symbol "void __cdecl MainPhase(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class...
  17. Re: creating array with size determined by user input?

    I didn't really get the above comments. Anyways, I tried this

    vector< vector<float> >Temp(N, vector<float>T);

    for (int i=0; i<N; i++)
    {
    Temp[i][0]=5;
    }
  18. creating array with size determined by user input?

    So in MATLAB, I can create a matrix with a size determined by the user input, such as below:


    T=input('Number of data points for time variable? ');
    N = input('Number of grid points N? ');
    Temp...
  19. Re: how much does array size affect compiling speed?

    thanks again for the suggestion!!! Heres the current code. I think the problem may be solved! I was able to get 500 n_simulations in only 5 minutes, which is about 10 times the previous speed. I'll...
  20. Re: how much does array size affect compiling speed?

    thanks alot for the improved formatting version of my program. Anyways, is there anything else I can do to improve my nested loops ?
  21. Re: how much does array size affect compiling speed?

    I made those changes. Also, I noticed I opened the ofstream too much, and that I'm better off opening the file once, writing everything, then closing after all the data is written.

    With all those...
  22. Re: how much does array size affect compiling speed?

    what do you mean the t=1 goes out of scope right away? I need it there so it can run through the if(t!=0) part

    Thanks alot for that suggestion to break out of the loop after setting t to 0. My...
  23. Re: how much does array size affect compiling speed?

    that previous attachment is wrong. the correct one is in this message. I fixed one of the if statements, as the previous one evaluated a few of them as 'if island[][250]', but island only goes from 0...
  24. Re: how much does array size affect compiling speed?

    whats the L2 CPU cache? The last time i took a c++ class was 2.5 years ago, and I don't think I learned about that.



    the code does compile. It just crashes if I have two 250x250 array...
  25. Re: how much does array size affect compiling speed?

    The program is in this message
Results 1 to 25 of 30
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured