Search:

Type: Posts; User: jewelz

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    2,434

    C++ Implementing String Operations

    hey guys, I was wondering if you can look over some code:

    1. char* reverse(char *s);

    *Here, s is a C-string. Its return value should be a newly-allocated C-string, said string being the...
  2. Replies
    9
    Views
    1,539

    ok..im just getting a compilation error for just...

    ok..im just getting a compilation error for just one algorithm



    template <class In>
    void my_fill(In b, In e, In t)
    {
    while (b != e)
    *b++ = t;
    }
  3. Replies
    9
    Views
    1,539

    whats wrong with this piece of code? its giving...

    whats wrong with this piece of code? its giving me a compilation error saying "expected constructor, deconstructer, or type conversion before my_min_element"



    template <class In>
    iter...
  4. Replies
    9
    Views
    1,539

    hows this: bool...

    hows this:



    bool my_lexicographic_compare(In b, In e, In b2, In e2)

    while (b != e)
    {
    if (*b2 < b || b2 == e2)
    return false
  5. Replies
    9
    Views
    1,539

    ok i indented the code...and I also included the...

    ok i indented the code...and I also included the driver program - this should not be touched at all..



    #ifndef GUARD_myalgorithm_h
    #define GUARD_myalgorithm_h

    template <class In, class Out>...
  6. Replies
    9
    Views
    1,539

    Implementing Library Algorithms

    hey guys..need some help with a project...im basically to implement the following 5 algorithms for a driver program...

    here are the algorithms:

    accumulate(b, e, t)

    equal(b, e, t)

    fill(b,...
  7. Replies
    8
    Views
    2,120

    hey, thanks for your help, I figured it out. here...

    hey, thanks for your help, I figured it out. here is the final update:



    #include <algorithm>
    #include <iomanip>
    #include <iostream>
    #include <stdexcept>
    #include <string>
    #include <vector>
  8. Replies
    8
    Views
    2,120

    yeah it doesn't print anything after Grade...

    yeah it doesn't print anything after Grade Distribution..and here is the updated code:



    #include <algorithm>
    #include <iomanip>
    #include <iostream>
    #include <stdexcept>
    #include <string>...
  9. Replies
    8
    Views
    2,120

    You're right..i deleted that portion and it still...

    You're right..i deleted that portion and it still works fine...the final part, however, still doesn't seem to work..
  10. Replies
    8
    Views
    2,120

    sorry I don't want to be bothersome, but this...

    sorry I don't want to be bothersome, but this homework is due pretty soon, and I really am not sure what seems to be the problem...
  11. Replies
    8
    Views
    2,120

    anyone?

    anyone?
  12. Replies
    8
    Views
    2,120

    Using Associative Arrays..

    Hey guys, I need some help...the HW description is basically that I have to allow the following program to print letter grades for each student following a certain criteria, and then it has to print...
  13. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    yeah..i made a silly mistake =) anyway thanks for...

    yeah..i made a silly mistake =) anyway thanks for all the help guys..really appreciate it
  14. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    Thanks guys i got it to compile, but i have a...

    Thanks guys i got it to compile, but i have a problem when running the program.. basically the program is supposed to read from the input and output the longest palindromes, along with it's...
  15. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    here is my code for the entire project: pal.h...

    here is my code for the entire project:

    pal.h


    #ifndef GUARD_PAL_H_
    #define GUARD_PAL_H_

    #include<string>
  16. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    well i included the and compiled it...

    well i included the <string> and compiled it again, this time the only problem is that it's saying that there is an undefined reference to 'isPalindrome(std.....)

    i dunno what to make of that...
  17. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    yeah but one of my classmates said he didn't need...

    yeah but one of my classmates said he didn't need to include that in his pal.h and it ran fine..plus i thought header files are generally not supposed to have them anyway?
  18. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    Ok now on to fix the problem that I have been...

    Ok now on to fix the problem that I have been having since completing the first part of the assignment (output just palindromes)...the compiler is telling me:

    pal.h:4: error: 'string' in namespace...
  19. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    hmm..getting a compilation error..it's saying: ...

    hmm..getting a compilation error..it's saying:

    error: expected identifier before '(' token

    indicating the line with while (cin >> s)
  20. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    typedef string::size_type string_size; is...

    typedef string::size_type string_size;


    is everything good now?? =)
  21. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    ok is this better?? int main() {...

    ok is this better??



    int main()

    {
    typedef string:: size_type string _size;

    string s;
  22. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    um..can u explain that a little more please? my...

    um..can u explain that a little more please? my method wouldn't output the longest palindrome?
  23. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    ok well this is what i came up with for printing...

    ok well this is what i came up with for printing the the palindromes:



    int main()
    {

    string s;

    while(cin >> s){
  24. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    so i dont have to include "pal.cc" anywhere?

    so i dont have to include "pal.cc" anywhere?
  25. Thread: Palindromes

    by jewelz
    Replies
    57
    Views
    6,740

    everything in my last post is my current code...i...

    everything in my last post is my current code...i didn't change anything from that..
Results 1 to 25 of 50
Page 1 of 2 1 2