182 Posted Topics
Re: One thing is that you are doing nothing much about the file i/o.Can you explain what you mean by no output. Check the tutorial fourm for a fstream file i/o tutorial,might help :D. | |
Re: Try file i/o.Here my tut [url]http://www.daniweb.com/techtalkforums/thread6542.html[/url] | |
Re: These are used to allocate memory dynamically.With these you get memory from the OS and point to that memory address with a pointer. Presonally I use C++ new operator. Eg. Some_data_type *object; object = (Some_data_type*)malloc(sizeof(Some_data_type),1); that is to assign memory. Then when you are finished with it: free(object); That's the … | |
Re: Gee, you sure were in a hurry but the lack of full stops really mangles what you say. This is not really a place to ask for homework answers.But I did look at your code and you use a lot of variables like a,b,c etc for what resonable puprose I … | |
Re: You mean to the paper or the screen. if you want on the screen use conio.h Colors ------ [CODE] 0 BLACK /* dark colors */ 1 BLUE 2 GREEN 3 CYAN 4 RED 5 MAGENTA 6 BROWN 7 LIGHTGRAY 8 DARKGRAY /* light colors */ 9 LIGHTBLUE 10 LIGHTGREEN 11 … | |
| |
Re: C or C++ though C++ is easier to use and much more object oriented.There are a lot of C/C++ compilers availabe. Visual C++ is expensive and Borland is ok.There are free versions of both. | |
Re: You can use structures [code] struct Dtime { int mins; int years; int days; }; [/code] The to declare a variable: [code] dtime datetime; [/code] And to assig values. [code] datetime.min = 10; datetime.year = 2004; [/code] Just use the var_name.member and you can do anything to them as would … | |
Re: Hey not sleep(2000) bleek, sleep(4) might be a nice number if sleep() is the same for your complier as for mine.I use Borland C++ and sleep() counts in seconds. There is also delay(int) funtion.It counts in some unit lower than a second. #include <stdlib.h> #include <dos.h> (I dont know which … | |
Re: [QUOTE=wolfstrike]hello. thanks to all of you for taking time to answer questions. i just started learning c++ and i'm confused as to how graphics are added to a program. does c++ have graphical capabilities on it's own or does it need another program like Direct-x? the graphics i make are … | |
Re: Hey I think you guys are barking up the wrong tree. scanf() works with options you sepecify.By options I mean all the stuff you specify in the " ".So it also means you can have multiple options too. [CODE] some options ------------- %s string (char *) %d int %f float … | |
Re: Yes they are quite the same and mainly an organising tool.They can be used for various purposes from just organisation to linking to static libs. What's funny is somethings are so used to people use them without a thought and dont document it.(like sugar,does anyone ask what it is) Try … | |
Re: Tried Google? [url]http://www.google.com/search?hl=en&lr=&ie=UTF-8&safe=off&q=Using+C%2B%2B+SAFEARRAY&btnG=Search[/url] You are right about it though.Not much info.But here is some interesting stuff. [url]http://www.codeproject.com/com/mfcclassinatl.asp[/url] [url]http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q216/6/86.asp&NoWebContent=1[/url] | |
Re: use if, if else and else.You can have multiple checks in a if statement [CODE] if(condition == true || condition < high) if(condition == true && condition < high) [/CODE] | |
| |
Re: [QUOTE=kc0arf] You also forgot the ; after all of the const's in your program. Christian[/QUOTE] You also forgot the ; after your funtion declarations What ever you do in C++ all line have to end with a ; except in a few cases like loops,if elses etc. | |
Re: >Hello guys, is there a way to declare global variables as [B]float[/B] and then convert them to [B]int[/B] to be used in a function? i.e. yea,sure thing use type casting. Eg: float x = 9.879; int y = (int)x; //y will be 9 you can do it the other way … | |
Re: [QUOTE=marceta]@cscgal go to bed earlier! [/QUOTE] Yea you should.Leave lights on at night if you are using the comp | |
Re: Please dont post such huge pics,my connection is slow at the best and it take a long time to download huge pic :-( | |
Re: Yea there are a lot of free compilers. [url]http://www.borland.com/[/url] [url]http://www.delorie.com/djgpp/[/url] [url]http://www.bloodshed.net/devcpp.html[/url] I would recommend Borland.If you get linux there a compiler with usually. [url]http://cplus.about.com/library/weekly/aa031502a.htm[/url] [url]http://www.scintilla.org/[/url] If you dont had a connection above or equal to ADSL then dont try downloading any big distros.Since you are new to linux: linux does … | |
Re: Tell me where my beans are!!!!! Tell me where my beans are!!!!! Tell me where my beans are!!!!! Tell me where my beans are!!!!! Tell me where my beans are!!!!! Make sense,no?post with more info next time jennie | |
Re: Not really. If you are using a header with a static library you should try getting the latest version of the static library. Otherwise if you have link errors is you own programs it maybe because you declared a funtion and forgot to define it.Check for these and fix them. … | |
Re: Coloring your text [url]http://www.daniweb.com/techtalkforums/showthread.php?p=30122#post30122[/url] File I/O [url]http://www.daniweb.com/techtalkforums/thread5720.html[/url] | |
Re: You could use GetTickCount(). [CODE] double next_time = GetTickCount(); while (true) { if(GetTickCount() >=next_time + 100) { cout<<"Bong\n"; next_time = GetTickCount(); } } [/CODE] | |
Re: [url]http://www.scintilla.org[/url] A multi-lingual editor and really lite.It's fully customisable by editing property files like a script file.Very useful for some one who works with multiple languages all the time. Some langs it supports:C/C++,Java,PHP,Perl,VBscript,Python yea right a lot more :-) | |
Re: Yea search buddy you will learn a lot .best of luck | |
Re: Dir.h is probably what you want if you use C++ int chdir(char *path); use it like chdir("c:\windows"); | |
Re: You can also use conio.h.Check my post below.It should give enough info I think. [url]http://www.daniweb.com/techtalkforums/showthread.php?p=30122#post30122[/url] | |
Re: Yup, C++ is the best to start out of the langs you mentioned. try [url]www.google.com[/url] and search for tutorials. If you have no experiance what so ever QBASIC is also somewhere to start. For C++ you will need a complier and the best free easy one for a new user … | |
Re: Also add what your program is supposed to do(a general idea) and put the compiler out put in [ c o d e ] | |
How many of you guys belive it is possible to program a server and create within it a simple environment in which people can write their own pieces of code and complie it without problems. This server should be capable of using multiple 'plugins'(the pieces to code which others write … | |
I am currently developing a Snake game with multiplayer support(Not Network based) with unlimited no of players(ok limited by the keys and RAM and processor speed but not restricted). I developed a nice concept of key maps to load all controller information into memory and handle it there.This works just … |
The End.