User Profile

Collapse

Profile Sidebar

Collapse
nemisis
nemisis
Last Activity: Aug 11 '11, 08:36 AM
Joined: May 20 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • nemisis
    nemisis posted a Visitor Message for SheDeville
    I know that this is an assignment for u and that u must really sux at programmin. unfortunately i was and am in the same boat as u. my 'fly pegion fly' code never compiled and never will. whatever i had is in this thread..
    http://bytes.com/topic/c/answers/649...lp-c-text-game

    Thats all. Hope u get help from somewhere else asap and good luck with it.


    ps- i would rather work on the...
    See more | Go to post

  • SheDeville
    SheDeville posted a Visitor Message for nemisis
    hi.... can i have a look at your fly pigeon fly program...
    now im desperately need ur help. i dont have any idea how to start... im totally beginner to c++. plus im not familiar enough with the syntax.

    mail the codes to my email please.
    myedoro@yahoo.c om

    really count on u now... i need to submit this on friday morning. please.

    Thanx.
    Azura.
    See more | Go to post

  • nemisis
    replied to Errors in my code
    in C
    ummmm nevermind i got it; was missing a '=' in this line in Point.h

    inline Properties(Poin t mypoint=(0,0),T aste mytaste = SALTY): my_point(mypoin t), my_taste(mytast e){}

    but i ll post more after i compile the whole program.

    Cheers
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to Errors in my code
    in C
    ok so i cleared whatever i could but am stuck with 2 major errors only

    Point.h
    [code=cpp]
    /**
    * A Point struct stores the coordinates x, y of a 2D location
    */
    #ifndef POINT_H
    #define POINT_H

    typedef enum
    {
    SWEET,
    BITTER,
    SALTY
    } Taste;

    struct Point
    {
    int x, y;
    inline Point(int X = 0,...
    See more | Go to post

    Leave a comment:


  • nemisis
    started a topic Errors in my code
    in C

    Errors in my code

    Fish.h

    [CODE=cpp]

    #ifndef FISH_H
    #define FISH_H

    #include <iostream>
    #include <vector>

    #include "Point.h"

    class Fish : public Animal
    {

    public:

    Fish();
    Fish(const int fish_breed_time );
    inline ~Fish() {decrement_num_ fish_current(); delete *this; };
    Point *vector PossibleSurroun dings(all_surro undings);...
    See more | Go to post

  • nemisis
    replied to basic questions
    in C
    Thanks for the above answers, here a bit more on which i need to undertsand...


    What is the purpose of #includ(ing) a class header within the class implementation file?

    In general what are the advantages and costs of using vectors rather than arrays

    In what cases would you use a vector? When would you use array?

    Why is a function parameter, or a function return value never const when...
    See more | Go to post

    Leave a comment:


  • nemisis
    started a topic basic questions
    in C

    basic questions

    Hi, I would like to know some answers of some basic questions. I am working on linux

    1)What are the advantages/disadvantages of commands at the console promp compared to using GUI programs?

    2) When does the header file get compiled?

    3)What is the output of the compilation stage?

    4) what does a cin.ignore() command do?

    5)In general what is the role of “const”
    See more | Go to post

  • nemisis
    replied to Bitmaping from files
    in C
    ok in the main function where object of Shapefactory is called, after its function returns a new shape, i need to read the file from the line where the shape's coordinates are described.


    Using the stream operator of the specific shape i hv to read the rest of the file from the pace where it says " draw Point <50 50>" and output this to the .bmp file using the 'draw()' function.

    Here is a description...
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to Bitmaping from files
    in C
    anyone? anything? something?
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to Bitmaping from files
    in C
    Help!

    file to read from points.vec, its format is described in the very first post . But just to say it again, Point- shape to make,<50 145> - <x,y>

    Code:
    image BMP 300 300
    
    colour <255 50 0>
    draw Point <50 145>
    draw Point <50 155>
    
    colour <255 52 0>
    draw Point <52 145>
    draw Point <52 155>
    
    colour
    ...
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to Bitmaping from files
    in C
    Also in the following code generates some errors too
    [code=cpp]
    #include "ShapeFactory.h "

    //Function return newShape
    Shape *ShapeFactory:: getShape(const std::string &in)
    {

    if(in == "Point")
    return new Point;
    if(in == "Line")
    return new Line;
    //if(in == "polygon")
    ...
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to Bitmaping from files
    in C
    Problem solved, the name of the file was "Makefile" and the target was to "makefile", so just had to change that........... ...

    I am trying to read from a file and pass the values to their respective classes.

    [code=cpp]
    int main(void)

    {
    int width, height,red, green, blue;



    //Declare filename variable
    string inVec;
    ...
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to Bitmaping from files
    in C
    Thanks WFC that worked perfectly well !!


    OK now when i compile the whole project in linux I get this error in the shell

    gccmakedep -- -Wall -pedantic-errors -g -- Rectangle.cc Bitmap.cc Image.cc Shape.cc ShapeFactory.cc Point.cc Line.cc FilledRectangle .cc Vector.cc
    make: *** No rule to make target `Makefile', needed by `vector.exe'. Stop.

    any idea what it means? i cant make head or tail...
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to Bitmaping from files
    in C
    ok going ahead, I have done as WFC said and finished quite a lot.

    Now I am getting errors in a particular file regarding functions.
    [code=cpp]
    #ifndef SHAPEFACTORY_H
    #define SHAPEFACTORY_H

    #include <iostream>
    #include <fstream>
    #include "Shape.h"
    #include "Point.h"
    //#include "Polygon.h"
    #include "Rectangle. h"...
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to Bitmaping from files
    in C
    well I do hv the syntax to create BMP files write pixel data into it.....


    The header file-
    [code=cpp]
    /**
    * bitmap.h
    *
    * Provides functionality for writing pixel data to an ostream
    * in .bmp format.
    *
    */

    #ifndef BITMAP_H
    #define BITMAP_H

    #include <ostream>

    /**
    * Represents a colour.
    */
    ...
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to Bitmaping from files
    in C
    so i modified a bit of my coding in the class image and here is what i have got so far

    [code=cpp]

    #ifndef IMAGE_H
    #define IMAGE_H

    #include <iostream>
    #include "bitmap.h"

    class Image
    {
    friend std::istream &operator >> (std::istream &input, Image &img );
    {
    ifstream inFile("polygon s.vec"); // opens the file...
    See more | Go to post

    Leave a comment:


  • nemisis
    started a topic Bitmaping from files
    in C

    Bitmaping from files

    I want to create a class from a file which
    1) has parameters width and height.
    2) Stores pixel data in dynamically allocated 2-dimensional array
    3)By default all pixel colours are black (red, green and blue
    values equal to 0).

    This is the file
    Code:
    image BMP 300 300
    
    colour <255 0 0>
    draw Polygon 3 <10 10> <10 90> <90 10>
    
    colour
    ...
    See more | Go to post

  • nemisis
    replied to help me in this program. please!!
    in C
    Give it a try, write ur variables,
    use the switch statement and don't forget to store the digits after the switch statement.

    Also remember that A=10, B=11 C=12 and so on , so u would hv to convert(represe nt) these values b4 the switch statement in variables of A , B, C

    And get the input from the user in a string rather than a double

    I am not so good at this but hope u can do something and then...
    See more | Go to post

    Leave a comment:


  • and i dont like the language of love(the way girls think, no offense)



    If there is something more difficult to understand, than one woman, its two women at the same time!!!!
    See more | Go to post

    Leave a comment:


  • nemisis
    replied to [n00b alert] c question
    in C
    Once u go there, come back and start asking for help again.......... .....give it a try by urself , if not then post ur problems here as to what u dont understand or if u dont know c at all , and u will be helped it....
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...