This bit of code will accept one character. If it is a not a number, it will loop back to the start, if it is a number, it will convert it to an int (from a char) and display it.
If you need more...
Type: Posts; User: Homer
This bit of code will accept one character. If it is a not a number, it will loop back to the start, if it is a number, it will convert it to an int (from a char) and display it.
If you need more...
MSVC++ has its own built in text editor so you dont need to write your source code in notepad.
Open MSVc++ then go to file|new.
Click on the files tab then C++ Source file.
Then click in the...
Thanks MrWizard, I tried that too, and that dosn't work.
I think I'm going to have to create a web page and get him to download it from there.
Thanks for your replies...
Thanks Zewu,
tried that already, didn't work!
Hi all,
I have written a funny program that takes your name and then assigns you a silly name.
Its written for MSVS C++ but should compile on any common compiler with slight modification:
...
Look up the use of getche() function, which is ANSI standard.
elchulo2002
The statement is not in a loop so it will not "keep on looping"
The cin will wait until something is input from the kb (+return).
The next statement is an IF statement,...
Hi Stefanie.
Are you at Tameside College?
We have just done a very similar excersise.
NO!!!!
The ANSI standard for the main function is:-
int main(int argc, char *argv[])
ie returns an integer. This is why the main function always terminates with return 0;
a lot of...
ER,
You mean
'if the variable input has the value 'q' then...
Your function prototype and definition need to have the same name
float std_dev (int [], int, float); // function prototype
float stdDev(int nums[], int numel, float av)
{...
};
Remove the second set of '<<' from the cout in line 57:-
cout<<i;
also, you may need to enclose the 8 in the case statement in single quotes:-
case '8':
This compiled to give no errors,...
To include capitals as well...
if ((a >= 'a' && a <= 'z')||(a >= 'A' && a <= 'Z'))
:)
I could not even compile the code, I am using Dev c++.
You do not have a return statement for yout main() function.
Also your main() function should be 'int main()' (not necessary on all...
Try your local library first...
It's an undertapped source of knowledge.
Then try sites like amazon.com and read the reviews.
hth
Hey! that's my catchphrase!
If kbhit has found a key, use getch() to retrieve it. If it is not the one you wanted, carry on with the program...
shouldn't this be "c:\\manfile.txt"; ?
Goto is an absoulte jump, mainly used in BASIC.
The use of goto in c++ is considered bad programming practice.
Are they also known as 'avaters' or something...
Zen's Code:-
#include <iostream>
using namespace std;
void fn(int array[][3] )
{
This is a bubblesort that I wrote for one of my projects.
it is written for Dev C++ so will probably need modifying.
You will also need to modify the method of inputting your data into your arrays....
This will give you a start:-
#include<iostream.h>
int main()
{
for(int x=0;x<99;x++)
{
cout<<"I will not hack other people's programs!\n";
};
I have been learning c++ since september 12th at college - 1 day/week.
Prior to that, I did City&Guilds visual basic again 1 day/week.
Prior to that... a long time ago... I did basic and a bit of...
We already have c#.
I suspect languages designed for the internet eg Java will become more popular.