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

Search:

Type: Posts; User: tzadik

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    7
    Views
    1,007

    Re: is there a better way?(stl list iterator)

    thanks Phil for the iterator::advance(). i know you're busy, which is why you forgot the open interval thingy:



    li = l.begin();
    if(l.size()%2!=0){
    advance(li,l.size()/2);// l.begin()...
  2. Replies
    7
    Views
    1,007

    Re: is there a better way?(stl list iterator)

    intuitively i would whimp out and repeat the method you designed; however i have done some research and i have formed an opinion on the skill set of those of who have had the benefit of 'java' as...
  3. Replies
    7
    Views
    1,007

    is there a better way?(stl list iterator)

    hey,
    my question is in regards to the fact that a list<T>::iterator apparently doesn't work with pointer notation or comparision operators(not a pointer?). i came up with this last night after...
  4. Replies
    7
    Views
    32,864

    Re: template error: shadows template parm

    got it working... i understand the part about redeclaration; however, i don't see why changing the parameter's identifier was crucial. my question on where i can find a resource still stands. thanks...
  5. Replies
    7
    Views
    32,864

    Re: template error: shadows template parm

    i'm still having problems; what part(s) of the code above needs to be removed? also, is there a resource that i can review? thanks.
  6. Replies
    7
    Views
    32,864

    Re: template error: shadows template parm

    could you give a small example, please?
  7. Replies
    7
    Views
    32,864

    template error: shadows template parm

    i see i am not the only one with template issues here; however this code compiles && runs in Visual Studio and not in gcc. i get the following errors:

    error: declaration of 'class T'
    error: ...
  8. Thread: in_list ?

    by tzadik
    Replies
    3
    Views
    748

    Re: in_list ?

    dude...
  9. Thread: C++ question?

    by tzadik
    Replies
    3
    Views
    566

    Re: C++ question?

    and your question is...
  10. Replies
    13
    Views
    1,487

    Re: multidimensional arrays..

    assignment is assignment; what you need is another data structure to hold the required values; ie :



    int b[12] = {1,2,3,12,34,22,11,19,75,10,4,20};
    int a[3][4];
    int x = 0,i,j;...
  11. Replies
    13
    Views
    1,487

    Re: multidimensional arrays..

    this is what i mean...



    //demo
    #include <iostream>
    using namespace std;

    int main(){
    int a[3][4];
  12. Replies
    13
    Views
    1,487

    Re: multidimensional arrays..

    are the values that you're assigning to the array discrete or random? you could use a for loop... the outer array index would be your row value; the inner the column value.
  13. Thread: Problem Solving

    by tzadik
    Replies
    5
    Views
    1,047

    Re: Problem Solving

    hey. i am a student. you do know that google is your friend? i just searched with the general terms stated above and found plenty of information! i even found some code... but i won't tell you...
  14. Replies
    18
    Views
    2,487

    Re: problem sorting pointer array

    so that's why the <bad_ptr> thing in the debugger! i do listen to what you gentlemen and ladies have to say... again thank you. due to the fact that my classmates were in tears thursday, i'll only...
  15. Replies
    18
    Views
    2,487

    Re: problem sorting pointer array

    You are a god!!!<not the g_d, mind you...> but a god none the less. i was ready to go back to java and be content with the crap that they spoon feed us...so i have to be mindful of the size(s) of the...
  16. Replies
    18
    Views
    2,487

    Re: problem sorting pointer array

    when i use that i get this:



    which is why i never thought that it might be a size issue. i did get rid of the dereferencing... here is the relevent code in main as of (3) minutes ago :


    ...
  17. Replies
    18
    Views
    2,487

    Re: problem sorting pointer array

    yeah, i'm back. after reading up on slicing i kind of thought that maybe i need to implement the assignment operator, i suspect that the compiler's version is the one doing the cutting. however the...
  18. Replies
    18
    Views
    2,487

    Re: problem sorting pointer array

    what you talking bout willis? <meaning slicing>
  19. Replies
    18
    Views
    2,487

    Re: problem sorting pointer array

    okay, how would i accomplish that? i'm using visual studio so i have access to a debugger, but since i'm a student and my instructor doesn't do any "unnecessary" instructing, i wouldn't know where to...
  20. Replies
    18
    Views
    2,487

    Re: problem sorting pointer array

    thanks for that Lindley, however i have a different problem now. i fixed the sort but i'm getting the wildest output. it looks like the sort is rearranging the fields in the different instances. i've...
  21. Replies
    18
    Views
    2,487

    Re: problem sorting pointer array

    thanks Alan. i fixed it, it was the (t) pointer as well as the sort. i used a different algorithm. i also am the only one who turned in the project on time :D so here is the corrected code...


    ...
  22. Replies
    18
    Views
    2,487

    problem sorting pointer array

    i hate to be back so soon, however i doubt seriously if i implemented the operator overloading in the subclasses correctly on this. the code runs fine without the sort:



    class media{
    ...
  23. Replies
    11
    Views
    1,947

    Re: cstring/strcat - did i screw this up?

    i see that i might as well move in... thanks for that Lindley. as you can probably guess i got to run the code at home finally and found the seg fault in gcc. and of course you're correct, different...
  24. Replies
    11
    Views
    1,947

    Re: cstring/strcat - did i screw this up?

    #ifndef ACCOUNT_H_
    #define ACCOUNT_H_

    #include <string>

    class account
    {
    protected:
    int acctnum;
    double bal;
  25. Replies
    11
    Views
    1,947

    Re: cstring/strcat - did i screw this up?

    IT'S VISUAL STUDIO! i re-read the posts and realized what you guys were saying about it shouldn't have compiled; i checked my code using someone else's account and found the problem. apparently there...
Results 1 to 25 of 49
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured