Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 2nd, 2006, 8:10 AM   #11
chabayo
Newbie
 
Join Date: Dec 2005
Posts: 3
Rep Power: 0 chabayo is on a distinguished road
...thx again...now (+ #include <iostream>) it works...but with g++ instead of gcc...
chabayo is offline   Reply With Quote
Old Jan 2nd, 2006, 8:49 AM   #12
Jerkstore
Newbie
 
Join Date: Dec 2005
Posts: 12
Rep Power: 0 Jerkstore is on a distinguished road
you might need a "return 0;" for gcc since your main returns an integer
Jerkstore is offline   Reply With Quote
Old Jan 2nd, 2006, 9:28 AM   #13
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Bah, it doesn't beep for me >:-(.
No fair.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Jan 2nd, 2006, 10:20 AM   #14
badbasser98
Hobbyist Programmer
 
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4 badbasser98 is on a distinguished road
Quote:
Originally Posted by coldDeath
Bah, it doesn't beep for me >:-(.
No fair.
Do you have a system speaker?
__________________
Learning to use C++ and loving every minute of it.
badbasser98 is offline   Reply With Quote
Old Jan 2nd, 2006, 3:49 PM   #15
Jason Isom
Programmer
 
Join Date: Dec 2005
Posts: 53
Rep Power: 3 Jason Isom is on a distinguished road
Quote:
Originally Posted by Jerkstore
you might need a "return 0;" for gcc since your main returns an integer
main in c++ already implicitly returns 0, whether you choose to explicitly write it or not.
Jason Isom is offline   Reply With Quote
Old Jan 2nd, 2006, 4:04 PM   #16
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Quote:
Originally Posted by badbasser98
Do you have a system speaker?
I assume so, but probably not because it doesn't beep.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Jan 2nd, 2006, 10:47 PM   #17
teencoder
Hobbyist Programmer
 
teencoder's Avatar
 
Join Date: Jul 2005
Posts: 158
Rep Power: 0 teencoder is an unknown quantity at this point
Using this info I wrote the worlds most annoying program. A good question though. Could useful handeling errors. Would that beep work in windows if not is there a windows equivalent.

My very annoying program.
#include <iostream>
using namespace std;
int main()
{  
    int count=0;
	while (count!=100)
	{
		cout << "\a";
		cout << "hello" << endl;
		count++;
	}
 return 0;
}

Thanks in advance for any info.
__________________
Geeks may not be cool now but in the long run they prosper.
teencoder is offline   Reply With Quote
Old Jan 5th, 2006, 8:09 PM   #18
irish
Programmer
 
Join Date: Nov 2005
Location: Belfast
Posts: 35
Rep Power: 0 irish is an unknown quantity at this point
It wasnt really for any specific thing other than to know how, tho i have made a tiny program so that when the user opens it, the program beeps for about.....an hour? lol

Gonna test it on a mate in school(hehe)

P.S. What site could i learn more about things like \n, \a, etc?

NOT for pranks, just for more knowledge.
irish is offline   Reply With Quote
Old Jan 5th, 2006, 9:06 PM   #19
Jason Isom
Programmer
 
Join Date: Dec 2005
Posts: 53
Rep Power: 3 Jason Isom is on a distinguished road
Quote:
Originally Posted by irish
It wasnt really for any specific thing other than to know how, tho i have made a tiny program so that when the user opens it, the program beeps for about.....an hour? lol

Gonna test it on a mate in school(hehe)

P.S. What site could i learn more about things like \n, \a, etc?

NOT for pranks, just for more knowledge.
http://msdn.microsoft.com/library/de...m/lexic_10.asp

Quote:
Originally Posted by MSDN
Newline = \n
Horizontal tab = \t
Vertical tab = \v
Backspace = \b
Carriage return = \r
Formfeed = \f
Alert = \a
Backslash = \\
Question mark = \?
Single quotation mark = \'
Double quotation mark = \"
Octal number = \ooo
Hexadecimal number = \xhhh
Null character = \0
Jason Isom is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:28 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC