Jump to content


Check out our Community Blogs

mebob

Member Since 01 Aug 2010
Offline Last Active Mar 21 2015 07:01 PM
-----

#618259 Starting with BASIC

Posted by mebob on 27 December 2011 - 05:52 PM

Welcome!

If you don't want to jump straight into VBA you may want to try Microsoft Small Basic. It's targeted at beginning programmers.
  • -1


#613010 Making basic OS in Assembly

Posted by mebob on 03 November 2011 - 11:27 AM

Yes, it would be a totally different process. Phones don't have the same type of CPU, so their instruction set is different. Also, the hardware set up is much different. Another problem would be figuring out how to actually get it onto the phone.
  • -1


#590517 Looks silly&driving me nuts

Posted by mebob on 06 February 2011 - 12:00 PM

All I know it does is clears the buffer. That's what I use it for. I don't generally use if statements like that, by putting something like "input >> y" as the conditional statement.
  • 1


#582047 Simple string problem

Posted by mebob on 28 November 2010 - 11:01 AM

What compiler are you using? I am getting an error at gets(name) for passing a double pointer to a function that takes a single pointer as an argument. Try this:
#include <cstdio>

int main()
{
     int i;
     char name[600];
     printf("Give something: \n");
     gets(name);
     for (i=0; i<=2; i++)
     {
          printf("%c", name[i]);
     }
     if (name[1]==' ') printf("no");
}
Notice that I put your variables inside main(). You should avoid global variables.
  • -1


#572949 Help with counting program

Posted by mebob on 09 September 2010 - 12:07 PM

#include <iostream>
using namespace std;

int main()
{
	int i;
	int num;
	int sum = 0;
	cout << "Please enter 5 integers:" << endl;
	for (i=0;i<5;i++)
	{
		cin >> num;
		sum += num;
		cout << "Current sum: " << sum << endl;
	}
	cin.ignore();
	cin.get();
}
Is that what you mean? Or this?
#include <iostream>
using namespace std;

int main()
{
	int i;
	int num;
	int sum = 0;
	cout << "Please enter 5 integers:" << endl;
	for (i=0;i<5;i++)
	{
		cin >> num;
		sum += num;
	}
	cout << "Total: " << sum;
	cin.ignore();
	cin.get();
}

  • -1


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download