76 Posted Topics
Re: C is the most basic language allowing maximum interaction with hardware!! Also, 90% of all other languages are derived from C. How dya think java is encoded ? They are all written using C! 'C' is the mother of them all :P :) And coming to why its still used... … | |
Re: Thats great! BUT , this is ur FIRST EVER project using your FIRST EVER programming language, i think its best to keep the idea simple and go for advanced features using it.. For exampe : Do a student database! Im doing the same for mine, except it has added functionality! … | |
Re: Use signed long double.. This increases the values that can be held by long double by two times (As it doesnt take values less than 0, and in this case, i dont think u require it) Also, if u want to define the number of decimal places in your output... … | |
Hey guys, I'm having this problem of trying to open shortcuts, i.e (.lnk) files and am also trying to open powerpoint slideshows (.pps) files through turbo c++. It didn't work so what i did was write a .bat file to open those programs and then converted that .bat file to … | |
Re: Ummm.. why is void main() wrong ? U can always use void main, it just indicates main isnt returning anything! Drawbacks, if any, please do list out, even I'd like to know.. As mentioned above, sort the array using the first alphabet of every string... eg : compare passengerName[1][0],passengerName[2][0] etc … | |
![]() | Re: Yea pretty evident... 1) Using int main with no return statement Thats ur problem i think 2) Y r u calling it 5 times ?? Calling it once will make it sort... 3)Next thing in ur bubble sort, there is no increment of pass in the for loop.. pass++ or … ![]() |
Re: Great... Pls include code next time ----------------------------- Closed ------------------------ | |
Re: Another tip - that is even if long double is falling short.. U can use [QUOTE]signed long double[/QUOTE] if u need only positive numbers and ur range is falling short.. What this does, is nothing but increase the range of long double by two times !! In response to the … | |
Re: Ok... If u still havent found it ! Mean - Average value - Can be found by adding all the numbers and then divided by the total number of numbers added Formula : Mean = a + b + c + d / 4 eg : 1 + 2 + … | |
Re: Agree with everyone !! That is your only problem... Rest of the code seems fine.. Try adding the function prototype or declaration ( as some ppl may call it )!! Its sure to work that way !! | |
Re: Hehe.... Waking up the zombies :P Please Repost as a new thread !! ------------------------------------ Closed --------------------------------------- | |
Re: Ummm...guys this is a very basic code.. using very basic and outdated libraries... [B]Inference : [/B] Shes using Borland Turbo C++ Ver 3.0 This is mostly used by almost all schools, colleges, universities to start out with the basics !! Coming To Program Execution The program is incorrect, it doesnt … | |
Re: Are you using windows 7 ? If yes, thats ur problem ! Windows 7 doesnt let you access system32 files through an external program!! Hence, Access violation reading location 0x00000038. | |
Re: Isnt it under the wrong section ??? I mean C Forum ?? U can do THAT too with C ?? | |
Re: An entire OS?? Making an OS is completely different and just a menu with various options !! I hope u know what u mean... Anyways... in c++, if using turbo c++ u can use graphics.h to add some graphics.. but for more detailed and a better appealing GUI, i dont … | |
Re: Even though u have tried that its great, but yet not the same! The solution is simple. When using getch(), when u press any key its ASCII Value is saved. Also , u are correct the Ascii value for the esc button is 27. U can just do the following … | |
Re: Agree with everyone above! Maximum if u need help, heres a hint for u Use a for loop starting from 0 and run till ur number cout<<i<<" + "<< n-i<<" = "<<n; where n is till where u want the loop to run(i.e 5 in ur example) and 'i' is … | |
Re: umm... ok... Its pretty simple... All u gotta do is search ur original array of each student for correct no. of answers! For eg: Student 2 got 8 correct and is #1 Student 3 got 7 correct and is #2 Since u know their positions and u have the sorted … | |
Re: Umm... not clear what u want to do... Do u want to print the corresponding amount u win when u pick a box ? eg : if the random no randindex generates is 3, the amount shown is 5 . Is that what ur trying to do ? Secondly, why … | |
Re: You are in both cases asking the file to return the address When u write return &result - it returns the address Also, since in this case *result is the pointer variable, when u say return result it again returns the address of *result. To get the program to return … | |
Re: Umm... i think there is an error for the while condition... Try using the following : [CODE]while(input) instead of while(input.good())[/CODE] Coz i've never come across that, please correct me if im wrong, I'd like to know the correct way ! | |
Re: Agree with narue's code ! Another modification that can be used, that is dman01's idea using getch() [CODE] # # \\include necessary headers # void main() {clrscr(); int i=0; char a[50]; while(a[i]!='\r') \\ reading carriage return(enter key) {a[i]=getch(); if(isdigit(a[i])==0) {cout<<"You have entered a character, please enter only numbers"; break; } … | |
Re: max error in u is given by du = dx + 2dy + 3dz where dx,dy and dz are the individual errors in x,y and z | |
Re: I think the below code can work [CODE] # # \\Include necessary headers # void main() {int grade[4]={0,0,0,0},mark,i=0; while((mark<100) || (i<20)) { cout<<"Enter marks for student"<<i+1; cin>>mark; if((mark>=0) && (mark<=29)) grade[0]+ = 1; if((mark>=30) && (mark<=39)) grade[1]+ = 1; if((mark>=40) && (mark<=69)) grade[2]+ = 1; if((mark>=70) && (mark<=100)) grade[3]+ = … | |
Re: [QUOTE=Zssffssz;1726490]Im Talken About The Basic (As in Simple not BASIC) DLL not Win32/OS/2 Kind. I Want The Dlls for the program to be in the 'bin' Directory thats is in the same folder as the .exe. Is there a simple (Not Moving Kansas) way to do this?[/QUOTE] Umm... copying the … | |
Re: Umm...dude, dont take me the wrong way.. But if u dont know what [20] stands for, u shouldnt be looking to create a phonebook program from the start... I think it'd be better u expand ur knowledge about the following topics : Basic Data Types - int,void,char,float,double Functions Arrays File … |
The End.