Search:

Type: Posts; User: Saggio

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,837

    Alright, I fixed things up a little bit by...

    Alright, I fixed things up a little bit by traversing to the middle instead of trying to keep tabs on the middle of the list at all times (a little less efficient, but at the same time, a lot...
  2. Replies
    3
    Views
    1,837

    Queue's and linked lists

    Alright, so I'm creating a Queue class using pointers, but instead of only being able to insert things into the back, I want to also insert things in the front, and in the middle. the problem I'm...
  3. Replies
    3
    Views
    3,395

    Okay, I figured out some stuff: Here's my new...

    Okay, I figured out some stuff:

    Here's my new code if anyone is interested:



    void Move(int i,int j)
    {
    if(Peg[i].top() <= Peg[j].top() /*&& (i*j != 2)*/)
    {
  4. Replies
    3
    Views
    3,395

    That's because I wrote pseudo-code in word, I...

    That's because I wrote pseudo-code in word, I didn't include the return types.


    Anyway, now that I got past that, I still can't get it to run properly. It goes through one move then crashes at...
  5. Replies
    3
    Views
    3,395

    Modded Tower of Hanoi

    Okay, so here's a modded tower of hanoi problem:


    Instead of 3, we have 4 pegs, a source peg, a target peg, and 2 auxiliary pegs. Disks can
    be moved from any stack to any other stack, with one...
  6. Yes, it's a member of the Vector class. The...

    Yes, it's a member of the Vector class.


    The only reason why the function header doesn't look right is because it's currently defined in the Vector.h class...I haven't created the .cpp...
  7. cannot convert parameter 2 from 'char *' to 'const char &'

    Okay, this error is rather annoying, as I can not progress with my program without resolving it.

    It is an e-mail checker, and this part is extracting the domains (we previously did it with arrays)...
  8. Replies
    1
    Views
    1,530

    Copying one char* to another not working?

    I have this constructor:


    Reverser::Reverser( char* string )
    {
    int bufferSize = 0;
    bufferSize = GetLength( string );

    Size = bufferSize;
    Buffer = new char[Size];
  9. Replies
    3
    Views
    1,109

    okay, after doing that and changing all .'s to...

    okay, after doing that and changing all .'s to ->'s, it now gives me a bad ptr error since it initializes it Buffer to NULL (0)...

    How would I do that? I'm editing old code to use heap allocation...
  10. Replies
    3
    Views
    1,109

    Problem allocating class on heap...

    Here's my main function, the problem lies almost in the first line where I delcare an instance of DynamicString on heap.

    If you need more code, just let me know:



    #include <fstream> // This...
  11. Replies
    4
    Views
    1,267

    Yeah, I usually turn it off, but I just installed...

    Yeah, I usually turn it off, but I just installed the windows vista beta last week, looks like I forgot :p
  12. Replies
    4
    Views
    1,267

    Sorry about that, the problem is that it does not...

    Sorry about that, the problem is that it does not seem to be getting the input from the file correctly. It doesn't work with the code you posted, either.


    EDIT: Oh wow, the whole problem was...
  13. Replies
    4
    Views
    1,267

    using file iostream....

    okay, here's my main...messy, I know, I've tried so much stuff to get it to run:


    void main()
    {
    int i = 0;
    ifstream fin("EmailTest.txt");
    char s[300];
    char* str = s;
    ...
  14. okay, here's what I have: here's the test...

    okay, here's what I have:

    here's the test string:

    "[email protected]"

    I have these calls: The first just copies the string and prints it, the second gets everything before the @ (not including...
  15. Sorry, for all of the replies next to each other,...

    Sorry, for all of the replies next to each other, but there is something wrong with the function it seems, but it's getting the correct length now.

    here's the function as it stands now, with a...
  16. IfYouSaySo, I understand what you're talking...

    IfYouSaySo, I understand what you're talking about with the vars...all Var names are specified by my professor, I have no control over that.
  17. alright, I got it, adding a NULL char at the end...

    alright, I got it, adding a NULL char at the end of the loop fixed it.

    Thanks! you jsut saved my butt :p
  18. I think it is just used incorrectly. after ...

    I think it is just used incorrectly.

    after


    Address.CopyTo(0, atPosition, LocalPart.UserName);

    I have
  19. nope, that's not the problem, I did a debug...

    nope, that's not the problem, I did a debug statement to print atPosition...it's right (8 for this particular string).

    Also, just to make sure, I hardcoded 8 into the call of copyTo

    there's...
  20. Can't seem to quite get this function to work...(should be easy)

    Okay, so I have created a class MyString, and in it, I have a copyTo function. It has a starting position, an ending position, and the string it's supposed to be copied to.

    Here's the function...
  21. Replies
    11
    Views
    2,035

    nevermind, I got it working. Thanks, guys

    nevermind, I got it working.

    Thanks, guys
  22. Replies
    11
    Views
    2,035

    It makes everything come up invalid...

    It makes everything come up invalid...
  23. Replies
    11
    Views
    2,035

    okay, this is what I come up with, but I still...

    okay, this is what I come up with, but I still can't seem to get it to work right...


    I came up with the bounds by looking at an ascii value key...


    for(int g = 0; g < length; g++)
    {...
  24. Replies
    11
    Views
    2,035

    I forgot to add . and @ to the list of chars...

    I forgot to add . and @ to the list of chars since it IS an e-mail addy. :p


    umm, I haven't formulated a for loop yet, I'm just trying to write down some pseudo-code, and I can't get the logic to...
  25. Replies
    11
    Views
    2,035

    Basic C++ question

    okay, what would the best way to check to make sure that all characters inputted by a user (which is stored as a char array) only consist of a-z, A-Z, and 0-9??


    I was thinking a for loop for...
Results 1 to 25 of 26
Page 1 of 2 1 2