how can I take this source code into doc or picture

Hi!! I'm the beginner and I have to present C++ in front of my class by using .ppt I just want to know, how can I put my code into .ppt with line number in front of each line. Thanks for those who give me a suggestion.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef EMPLOYEE_H
#define EMPLOYEE_H
#include<string>
using std::string;

class Employee
{
    public:
        Employee(const string &,const string &,const string &);

        void setFirstName(const string &);
        string getFirstName()const;

        void setLastName(const string &);
        string getLastName()const;

        void setSSN(const string &);
        string getSSN()const;

        virtual double earnings()const = 0;
        virtual void print()const;

    private:
        string firstname,lastname,SSN;

};

#endif // EMPLOYEE_H 
Last edited on
Please do not litter the forum with your test postings.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef EMPLOYEE_H
#define EMPLOYEE_H
#include<string>
using std::string;

class Employee
{
    public:
        Employee(const string &,const string &,const string &);

        string firstname,lastname,SSN; //same functionality

        virtual double earnings()const = 0;
        virtual void print()const;
};

#endif // EMPLOYEE_H  
srry, I didn't mean to do that. I just want to get a picture like that one for my presentation in powerpoint but I don't know how to make it into this way. Anyone has suggestion???
Step 1: Open with a text editor that supports syntax highlighting / line numbering (aka a text editor that doesn't suck)
Step 2: Print to image
Step 3: Include image in power point
Step 4: Profit?
like Wordpad isn't it ? Could u instance some for me?
Last edited on
On many modern operating systems, pressing "Print Screen" on the keyboard creates a picture of the screen on the clipboard. You can then paste that image into whatever image editor you have to hand (I seem to recall "Paint" came as standard on Win) and edit it from there. You can then insert the saved image into your PowerPoint slides.
Print to file gets you higher quality pictures though.
Thank you for all suggestion a lot. I got it :) thks u again. (^_^)
There is also the listing environment.
Topic archived. No new replies allowed.