This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2011-11-28 01:13:40

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Software development company

samtwheels wrote:

nathanprocks wrote:

I have been wanted to learn c++ for ages but I couldn't be bothered learning. Can i join.

sure! make sure you get a little knowledge online or something.

Yeah thanks... I know a bit of HTML, BASIC, Visual Basic, dos batch scripting, scratch and maybe a couple of other stuff... So what is the first project you are planning?...


Oh... I forgot... My mum is using the family computer and the Internet for tafe homework and I fixed my Windows laptop by installing Linux so I can't use that...


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#27 2011-11-28 16:25:49

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

Just so you know guys, I can't use visual C++ anymore cause my dad deleted it. I'll be using a different one.

Offline

 

#28 2011-11-28 16:33:04

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

got code::blocks.

Offline

 

#29 2011-11-28 22:05:15

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

bump.

Offline

 

#30 2011-11-29 00:09:31

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Software development company

Ok I hope I can get a linux version  big_smile


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#31 2011-11-30 16:39:23

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

nathanprocks wrote:

Ok I hope I can get a linux version  big_smile

Ok. I'll start on the OS today. What should we call it?

Offline

 

#32 2011-11-30 18:35:12

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

Started programming. How about "Geek OS"? I made it a constant, so it is easily editable in the code.

Offline

 

#33 2011-11-30 18:37:50

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Software development company

Wait is it a real operating system?


Posts: 20000 - Show all posts

Offline

 

#34 2011-11-30 22:08:03

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

veggieman001 wrote:

Wait is it a real operating system?

no. It just runs in a MS-DOS window. I will make a few changes and upload the source code tomorrow.

Offline

 

#35 2011-12-01 00:16:01

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Software development company

samtwheels wrote:

veggieman001 wrote:

Wait is it a real operating system?

no. It just runs in a MS-DOS window. I will make a few changes and upload the source code tomorrow.

lol what about... SHOCK! OS... lol the sad thing is that i use Ubuntu on my laptop now but maybe i can use my mum's computer


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#36 2011-12-01 10:14:23

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Software development company

Hm… without the LotR and KH references, Bolt OS?  Flood OS?

Offline

 

#37 2011-12-01 16:27:06

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

I like Bolt. I'll upload now.

Offline

 

#38 2011-12-01 16:34:31

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

Here it is. Bolt OS

Last edited by samtwheels (2011-12-01 16:34:53)

Offline

 

#39 2011-12-03 09:32:12

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Software development company

I'm having trouble with the download; can you just post the source code, without requiring us to download the cpp file?  If you don't want random people to see it, they can just click the link too.

Last edited by maxskywalker (2011-12-03 09:33:44)

Offline

 

#40 2011-12-03 11:07:28

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

maxskywalker wrote:

I'm having trouble with the download; can you just post the source code, without requiring us to download the cpp file?  If you don't want random people to see it, they can just click the link too.

It's open source, so I can deal with random downloads. also, if the code gets long, putting it online could result in too big posts. I'll do it later, though.

Offline

 

#41 2011-12-03 11:36:02

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

Here:

Code:

//OS project, by our software development company.
//Put any comments on changes we should make up here.



#include <iostream>
//defines OS name
#define NAME "Bolt"
//allows string variables.
#include <string>



//use namespace and declare variables 
using namespace std;
int command;
int op1;
int op2;
bool codeNameExists = false;
string letter;
string number;
string codename;



void getCommand(void) //gets a command from the user.
{ 
     std::cout << "\n>>";
     std::cin >> command; 
         if (command != 4){ //Code to test for shutdown
                if (command == 1){
                            cout << "Operand 1: ";
                            cin >> op1;
                            cout << "Operand 2: ";
                            cin >> op2;
                            cout << op1 + op2 << " is the answer.";
                            }
                if (command == 2){
                            cout << NAME << " OS was created by a group of \n Scratchers in the Miscellaneous forums.";
                            }
                if (command == 3){
                            if (codeNameExists){
                                                cout << "Your current codename is: " << codename << endl;
                            }
                                                
                            cout << "What would you like your letter to be?";
                            cin  >> letter;
                            cout << "\nWhat would you like your number to be?";
                            cin >> number;
                            codename = letter + number;
                            cout << "Your codename is " << codename << endl;
                            codeNameExists = true;
                }
                getCommand();  
                }          
}






int main() {       //main program, not much body so far
    




    //welcome the user.
    //when we have a name, add it in.
    cout << "Welcome to " << NAME << " OS.\nKey:\n1: addition calculator\n2: About\n3: Codename\n4: Shutdown System ";
    getCommand();


    

                
}

Offline

 

#42 2011-12-03 15:35:26

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

bump.

Offline

 

#43 2011-12-03 15:56:32

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Software development company

Alright thanks!  I just copied this (haven't read much yet; I'll do that when I paste it into Code::Blocks), so thanks for doing this for me.

Edit: I just read it.  It's not bad.  For the calculator, might I suggest getting rid of the op1 and op2 variables (keep reading to see why)?  I wrote a calculator program, which I'd be glad to give to Bolt OS.  Here it is:

Code:

#ifndef CALCULATOR_H_INCLUDED
#define CALCULATOR_H_INCLUDED

#include <iostream>
#include <string>
#include <sstream>
using namespace std;

// This revision adds default values and void functions.

void add (double num1=0.0, double num2=0.0, string input="0")
{
    cout << "This: ";
    cin >> input;
    stringstream(input) >> num1;
    cout << "plus this: ";
    cin >> input;
    stringstream(input) >> num2;

    double answer = num1 + num2;
    cout << num1 << " + " << num2 << " = " << answer;
}

void sub (double num1=0.0, double num2=0.0, string input="0")
{
    cout << "This: ";
    cin >> input;
    stringstream(input) >> num1;
    cout << "minus this: ";
    cin >> input;
    stringstream(input) >> num2;

    double answer = num1 - num2;
    cout << num1 << " - " << num2 << " = " << answer;
}

void mul (double num1=0.0, double num2=0.0, string input="0")
{
    cout << "This: ";
    cin >> input;
    stringstream(input) >> num1;
    cout << "times this: ";
    cin >> input;
    stringstream(input) >> num2;

    double answer = num1 * num2;
    cout << num1 << " * " << num2 << " = " << answer;
}

void div (double num1=0.0, double num2=0.0, string input="0")
{
    cout << "This: ";
    cin >> input;
    stringstream(input) >> num1;
    cout << "divided by this: ";
    cin >> input;
    stringstream(input) >> num2;

    double answer = num1 / num2;
    cout << num1 << " / " << num2 << " = " << answer;
}

int main ()
{
    string input;
    short loop = 1;

    while (loop == 1)
    {
        cout << "\n1) Add\n2) Subtract\n3) Multiply\n4) Divide\n5) Exit\n\nWhat would you like to do?\n";
        cin >> input;

        if (input == "1")
        {
            add ();
            continue;
        }

        else if (input == "2")
        {
            sub ();
            continue;
        }

        else if (input == "3")
        {
            mul ();
            continue;
        }

        else if (input == "4")
        {
            div ();
            continue;
        }

        else if (input == "5" || input == "quit")
        {
            loop = 0;
            break;
            return 0;
        }

        else
        {
            cout << "That is not a valid operation.  Please use the number listed with the operation you would like to preform.\n";
            continue;
        }
    }
}


#endif // CALCULATOR_H_INCLUDED

Sorry that I don't use comments really.  I never really expect to share my code.  But I think it should be self explanatory enough.  I've edited it so that you can just add it to the file directory and #include ".h" it.  Here's the code with the refined calculator:

Code:

//OS project, by our software development company.
//Put any comments on changes we should make up here.



#include <iostream>
//defines OS name
#define NAME "Bolt"
//allows string variables.
#include <string>
#include "Calculator.h"



//use namespace and declare variables
using namespace std;
int command;
int op1;
int op2;
bool codeNameExists = false;
string letter;
string number;
string codename;



void getCommand(void) //gets a command from the user.
{
     std::cout << "\n>>";
     std::cin >> command;
         if (command != 4){ //Code to test for shutdown
                if (command == 1){
                            calc ();
                }
                if (command == 2){
                            cout << NAME << " OS was created by a group of \n Scratchers in the Miscellaneous forums.";
                            }
                if (command == 3){
                            if (codeNameExists){
                                                cout << "Your current codename is: " << codename << endl;
                            }

                            cout << "What would you like your letter to be?";
                            cin  >> letter;
                            cout << "\nWhat would you like your number to be?";
                            cin >> number;
                            codename = letter + number;
                            cout << "Your codename is " << codename << endl;
                            codeNameExists = true;
                }
                getCommand();
                }
}






int main() {       //main program, not much body so far





    //welcome the user.
    //when we have a name, add it in.
    cout << "Welcome to " << NAME << " OS.\nKey:\n1: addition calculator\n2: About\n3: Codename\n4: Shutdown System ";
    getCommand();





}

Well, I think it's about time to hit Submit, considering I've had the Edit screen open for like 10 mins.  Hope you like it.

Last edited by maxskywalker (2011-12-03 16:36:41)

Offline

 

#44 2011-12-03 18:10:22

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Software development company

Bump.

Offline

 

#45 2011-12-03 19:05:59

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Software development company

Ignore this post.  (Mods, please don't delete this.  It's not spam.  It had a purpose)

Last edited by maxskywalker (2011-12-04 09:44:07)

Offline

 

#46 2011-12-04 16:38:39

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Software development company

Bump.

Offline

 

#47 2011-12-04 19:02:58

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Software development company

samtwheels wrote:

maxskywalker wrote:

I'm having trouble with the download; can you just post the source code, without requiring us to download the cpp file?  If you don't want random people to see it, they can just click the link too.

It's open source, so I can deal with random downloads. also, if the code gets long, putting it online could result in too big posts. I'll do it later, though.

The code would be just the same length, and the posts don't get too long because of the [ code ] tags.  Am I missing something?  If I'm the only one who really needs it, why should anyone else care?  I'll deal with it.

Offline

 

#48 2011-12-05 15:24:02

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Software development company

Okay, seriously.  The only people who have ever posted on this other than 'can I join?' are me and samtwheels.  And I'm the only one who's posted in 2 days!

Offline

 

#49 2011-12-07 15:41:15

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Software development company

Okay, this is getting ridiculous.  It's been 4 days.

Offline

 

#50 2011-12-07 16:41:38

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Software development company

maxskywalker wrote:

Okay, this is getting ridiculous.  It's been 4 days.

Sorry about that. I'll modify the code now.

Offline

 

Board footer