Search:

Type: Posts; User: cisokay

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,228

    Anyone have an idea on how to start on this...

    Anyone have an idea on how to start on this function?
  2. Replies
    3
    Views
    1,228

    I'm trying to add the countMax() function but I'm...

    I'm trying to add the countMax() function but I'm not sure how to properly check for prefixes.



    int countMax(char x[])
    {
    TrieNode *current = root;
    int i = 0;
    if(Member(char...
  3. Replies
    3
    Views
    1,228

    CountMax function

    I have this trie class that has a few methods I'm trying to add addtionally two more new methods. A countMax() to count the number of words (x) such that no prefix with at least one letter of (x) is...
  4. Replies
    17
    Views
    4,480

    Thank you very much, after many hours reading and...

    Thank you very much, after many hours reading and debugging I finally got the system working. The problem know is that I have variables count and maxcount for each of the classes, I have to create a...
  5. Replies
    4
    Views
    2,125

    Super Function like in JAVA

    I have question about constructors,

    If i have



    Class A {
    private:
    int x;
    int y;
  6. Replies
    17
    Views
    4,480

    I'm still confused about the Person constructor,...

    I'm still confused about the Person constructor, when you create an instance of another type of person you have to handle it in the person constructor?



    Person::Person(string name, int age, int...
  7. Replies
    17
    Views
    4,480

    Yea I thought it be best to use this scope to...

    Yea I thought it be best to use this scope to make it clear. I'm just having trouble setting up the constructors. What should be set to what and how it should be set. I've done OOP in JAVA before and...
  8. Replies
    17
    Views
    4,480

    I think I should scale the program down till I...

    I think I should scale the program down till I fully understand what is going on in each of the instances of person. I have completed most of the coding and size it down to 1 base/abstract class and...
  9. Replies
    17
    Views
    4,480

    In the destructor should it be the following: ...

    In the destructor should it be the following:



    Chancellor::Chancellor(string name, int age, int years_in_college, SEX sex,
    string department, LEVEL level, bool cameFromUCSB)
    ...
  10. Replies
    17
    Views
    4,480

    We haven't gone into advanced topics such as...

    We haven't gone into advanced topics such as wrappers and stl libs. Maybe the test program we are given will shed some light.



    #include "school.h"

    int main()
    {
    Initialize(10); // No...
  11. Replies
    17
    Views
    4,480

    Here is what I have so far as my sources, sorry...

    Here is what I have so far as my sources, sorry if its alittle long.

    school.h


    #include <iostream>
    using namespace std;

    typedef enum {male, female} SEX;
    typedef enum {assistant,...
  12. Replies
    17
    Views
    4,480

    Abstract classes

    If I have to create a .h and .cpp file and I have to work with abstract classes and classes that inherit from the base class. How should I break down the header and cpp file? I'm not sure which goes...
  13. Replies
    3
    Views
    1,639

    No, the image isn't getting changed at all. Yes...

    No, the image isn't getting changed at all. Yes our professo told us about the padding. He said with our bmp that he gave us, we won't have to compensate for that issue. All information from header...
  14. Replies
    3
    Views
    1,639

    writing an image

    I'm given a bmp and I'm trying to create a new image and output that to bmp file. I'm not sure if I'm doing it correctly.

    Bmp consist of three 3structs:

    Header, InfoHeader, Data

    I'm able to...
  15. Replies
    18
    Views
    2,668

    Thank you all for your great comments and hints....

    Thank you all for your great comments and hints. I actually solved this yesterday using the nice bitset class. Though, these other methods are great as well. Thank you all.
  16. Replies
    6
    Views
    1,462

    Thanks, I think I get it now. One question, I get...

    Thanks, I think I get it now. One question, I get makefile:4: *** missing separator. Stop. error. I'm copying directly from your post.

    It isn't liking the
    .PHONY clean compile
  17. Replies
    6
    Views
    1,462

    So if prog.o is older than prog.c then it will...

    So if prog.o is older than prog.c then it will compile the source with this makefile, else it will skip it ?



    #Makefile
    #############

    default: clean compile

    compile: prog.cpp
  18. Replies
    6
    Views
    1,462

    Quick Makefile Question

    Sometimes when I run my makefile that consist of the following

    [code]
    default:
    g++ -o prog1 prog1.cpp

    clean:
    rm -rf *.o
    rm -rf core*
    [code]
  19. Replies
    18
    Views
    2,668

    Thanks that works great, your refraction shortens...

    Thanks that works great, your refraction shortens the lines of code. Now I got the conversion to work and able to work with it in binary. I have to convert it back. I made a function that used...
  20. Replies
    18
    Views
    2,668

    Bit Computation

    I'm given a string that is of binary 1's and 0's and I'm trying to make a function that is able to set the bits to the location that is specified.

    If 35 represented in 100011

    If I wanted to set...
  21. Replies
    1
    Views
    999

    Argument handling

    I have a program that can take in 3 arguments. They can be called in almost any order and they can be invoked more than once. I'm trying to use a switch statment to determin which case is called, but...
  22. Replies
    1
    Views
    999

    Argument handling

    Does anyone have a good example/tutorial of how to handle flags using getopts or another structure with values to be read in right after the flags. I'm using a generic switch checking for the '-'...
  23. Replies
    22
    Views
    7,516

    Thanks, I actually figured out how to loop...

    Thanks, I actually figured out how to loop through a certain amount of bases to print out. Just threw another while loop outside of the input check and as long as the val < valtostopat. Thanks for...
  24. Replies
    22
    Views
    7,516

    How would I modify it to make it print bases 0 -...

    How would I modify it to make it print bases 0 - 30?

    I can see that:



    char table[] = "0123456789ABCDEFGHIJKLMNOPQRST";


    Can be modified for the switch statment, but I'm unsure how the...
  25. Replies
    22
    Views
    7,516

    Sorry about that. This should compile now. Though...

    Sorry about that. This should compile now. Though I still get the floating core dumped process. Not sure if it is because base is init to 0. Thank you for your time.



    #include <iostream>...
Results 1 to 25 of 53
Page 1 of 3 1 2 3