Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
70% Quality Score
Upvotes Received
5
Posts with Upvotes
4
Upvoting Members
5
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
3 Commented Posts
0 Endorsements
Ranked #1K
~41.0K People Reached
About Me

Simple and Sensitive guy

Interests
Programming,coding,passionate about things related to computer science.. beside that photography,listening…
Favorite Forums
Favorite Tags

48 Posted Topics

Member Avatar for rwkopcke
Member Avatar for akiller47

[QUOTE=akiller47;505794]Hi, Im trying to figure out how to display a number from an array where it has been chosen by a random number. [/QUOTE] what are you using to generate randome number ??? the array or the rand function??? what do u exactly want?? [QUOTE=akiller47;505794] Now If the random number …

Member Avatar for kayceedude
0
294
Member Avatar for rajatC

Well i use Dev-c++ 4.9.9.2 for programming..i m using it from last two years...recently i learned java and saw that all java programs are run through command prompt. I tried tha same in c++. i saved my program in dev-cpp/bin .but i am not able to do this..what is the …

Member Avatar for joaquince
0
3K
Member Avatar for deepak1331

use [inlinecode]getch()[/inlinecode] to get a character without echoing it on the screen and print * for each entered character..and save each character in a char array [code=c++] char pswrd[20]; int i=0; while((pswrd[i]=getch())!='\r') { cout<<"*"; i++; }[/code]

Member Avatar for Narue
0
10K
Member Avatar for ALI SHER

are u talking about RAT IN A MAZE problem...how will the user input the next move...cordinates at the console or click with the mouse..what's the objective actually..

Member Avatar for aakash juneja
0
949
Member Avatar for CaninA

what do you want from user as choice..for what purpose the user have to choose one???

Member Avatar for uchihakyu
0
260
Member Avatar for C-+

well just to add something... if u have already used a particular data type for somthing and in the middle of ur program u want to use other one for that (just for a particular use) ...then u can use casting .... i.e. changing one data type into other momentarily...

Member Avatar for n1337
0
140
Member Avatar for sara_84

sorry to interrupt but i dont understand what the FIRST DIGIT & SECOND DIGIT procedures are doing here...what are u trying to do by calling them in very first few lines of your program. well if you are having assembly course in your college then i will suggest you to …

Member Avatar for anomalice
0
136
Member Avatar for newcountry

hi... i know how to convert any number into binary....but i dont know which format or mode are u talking about.....u can use the carry bit to output the binary representation of a number...but i think that's so simple and u r talking about something else...i m not getting ur …

Member Avatar for zifr
0
429
Member Avatar for jmvr_danga_14

[QUOTE=sarehu;510617]You'll need a database of cities and their latitude-longitude coordinates, or access to an online database, and you'll need an algorithm for finding the distance between two points on a sphere, given their latitude/longitude coordinates. The latter is done by the haversine formula.[/QUOTE] exactly... this is what i was going …

Member Avatar for WolfPack
0
2K
Member Avatar for rajatC

hi! i want to change the icon of an exe file. And the file will be moved from computer so the icon must be embedded in the exe file...is there any way?? the exe file is a daily use application so i want to give it an icon which shows …

Member Avatar for Duoas
0
373
Member Avatar for rajatC

hi friends... i have some doubt regarding the output at the console. what we generally have is that the output is written on the console and the cursor moves always forward. But what if in some special case we want to back track the cursor a few characters of lines …

Member Avatar for rajatC
0
132
Member Avatar for rajatC

How to output to an excel file and how to read from it?? i have done the writing part...to use [inlinecode]"\t"[/inlinecode] for moving to next cell in same row and [inlinecode]"\n" [/inlinecode]to move to next row... and is there any special format to save that excel file..because when i save …

Member Avatar for jacki
1
6K
Member Avatar for anallan

i do not understand what have you done here... [code=c++] if (gPos != string::npos){ while (gPos != string::npos){ newStr = firstStr.substr(0,i); newStr += firstStr.substr (i + j); }[/code] what is [B]npos[/B]??? on my compiler it is giving a very larg about [B]10 digit number[/B]...and your while loop is [B]indefinite[/B]...

Member Avatar for anallan
0
669
Member Avatar for rajatC

I recently saw this function in one of the online test paper i was going through. And i came to know that this is a standard library function but i dont know anything about it. And it is related to some Parent process - Child process kind of things. And …

Member Avatar for rajatC
0
125
Member Avatar for uthnim

[QUOTE=Ancient Dragon;505697] the line terminator "\r\n" pair in MS-Windows. When using *nix it is only "\n" and MAC its "\r".[/QUOTE] "\r" is for enter key and "\n" is for line feed...correct me if i am wrong.. and if not please tell me what is a line feed?? why it is …

Member Avatar for Duoas
0
139
Member Avatar for wijitha

new keyword is used for dynamic memory allocation..that's all i see i have seen the second type of declaration in java....haven't seen in c++..

Member Avatar for invisal
0
91
Member Avatar for jsully1

[QUOTE=darkscript;502792]Another one is "C++ Primer", which doesn't require you to know C but it does require you to have programmed before.[/QUOTE] do u have an ebook of that?? if yes please let me know..i want a copy..i will give u my id..

Member Avatar for jsully1
0
190
Member Avatar for tehprince
Member Avatar for Red Horse

practice is also necessary...keep practicing small problems on the topic you have just read...it will give you better understanding... simply reading from a book is not sufficient...

Member Avatar for invisal
0
96
Member Avatar for rajatC

I want to write all the output to the output file and don't want to print on the console output...the file (in which the output has been written) should be opened after i run the program. which function to use for opening a file to see output( at run time)?? …

Member Avatar for rajatC
0
169
Member Avatar for kaly45
Member Avatar for ithelp
0
114
Member Avatar for guitarrick

Actually i am not getting what exactly your problem is? but i read your program and i found that there are a lots of loopholes...and i must not give you the required result...so tell me if it is working... You are having a lots of unnecessary vairables and if clauses... …

Member Avatar for guitarrick
0
143
Member Avatar for nemoo

[B]rand()[/B] function just generates random number. it is us who have to decide the range in which we want the random number to be... and taking mod is the easiest way to confine it... general form is ... [inlinecode]rand()%range;[/inlinecode]

Member Avatar for rajatC
0
243
Member Avatar for dh273

here it is not effecting where you put the brackets...but take care of brackets when you want to typecast the result of an expression.... example... [inlinecode]Dayoff= (Days)((x+y-5)*z);[/inlinecode]

Member Avatar for Narue
0
103
Member Avatar for sara_84

oopss....such a long code.... is evey if statement convertible to switch...isn't it possible only in nested if's not mutually exclusive

Member Avatar for Jishnu
0
191
Member Avatar for bis student

[B][COLOR="Green"]pass by value...[/COLOR][/B] it just send the value of the variable(one memory location) to the function...and that value is stored in another variable(another memory location) that is declared in the function... [inlinecode]void foo(int b);[/inlinecode] when you call this function from the [B]main [/B]like.. [inlinecode]foo(a);[/inlinecode] the value stored in memory allocated …

Member Avatar for twomers
0
128
Member Avatar for zoner7

[QUOTE=zoner7;502149]I figured it out. The function pow does not accept integers, only doubles. I just created my own doubling function. [/QUOTE] the function definition of three_point_dist is wrong i think...is it working... you have written [inlinecode]float Three_Point_Distance[B](x1, x2, y1, y2,[/B] int z1, int z2)[/inlinecode] won't x1,x2,y1,y2 need [B]type specifier[/B]??? [QUOTE=zoner7;502149] …

Member Avatar for rajatC
0
118
Member Avatar for PL.P27

well dont u need to first getText from the guessI textfield and then compare it to the word string... like [code=java] String g=new String(""); g=guessI.getText(); if(g==word) //worked; else //wrong;[/code] i am also new in java...correct me if i am wrong

Member Avatar for rajatC
0
97
Member Avatar for javaAddict

dont know about the standard library function but u can mannualy do it in 2 lines.. [code=java] int days_in_feb=28; if(do it urself....cant help) days_in_feb=29; [/code]

Member Avatar for javaAddict
0
294
Member Avatar for obscured47

vmanes is right.. still if you want to keep both of them (i.e. int and float) then you may check for the '.' decimal in the string using iterators or anything else to traverse the string....

Member Avatar for Duoas
0
135
Member Avatar for limac

[QUOTE=limac;501806]thanks invisal but, it didn't cause any compilation error but for any number i put in it is showing -1 as the result[/QUOTE] the code given by invisal is absolutely correct.. it must work for you.. and one more thing..in your original code you worked for factorial in a for …

Member Avatar for rajatC
0
216
Member Avatar for raniajay

write a function for factorial and sum its digits and check for equality...it's simple..isn't it??? do u want a complete code?? if yes then sorry..nobody will help you here for that...

Member Avatar for rajatC
0
100
Member Avatar for wijitha

In developer c++ u can use hex keyword as shown [inlinecode] cout<<hex<<number; [/inlinecode]

Member Avatar for Jishnu
0
120
Member Avatar for sakthi123
Member Avatar for mickinator
0
112
Member Avatar for limac

correct .. you need to specify string in double quotes...and use double[B] equal to[/B](==) sign to check equality in [B]if()[/B]

Member Avatar for Rippie
0
266
Member Avatar for zoner7

thanks for the links...they are really useful... but my problem is that i dont know what are [B]commands [/B]to compile and run the cpp program.. ok see [B]steps are[/B] 1.save file in bin 2.run command prompt 3. type in [inlinecode]cd c:\dev-cpp\bin[/inlinecode] now i m in the same directory where the …

Member Avatar for Jishnu
0
183
Member Avatar for pikkas

>Sun website is always best place to search for an tutorial, like now Lesson: Laying Out >Components Within a Container. Have funn reading it NICE....really useful information...

Member Avatar for rajatC
0
88
Member Avatar for bis student

[code=c++]for(int i=0 ; i<50 ; i++) {cout<<a[i]<<" "; if(i%10 == 0) cout<<endl; }[/code] you had to use[inlinecode] cout<<endl[/inlinecode] if i is divisble by 10 i.e. 10 elements has been printed..

Member Avatar for invisal
0
4K
Member Avatar for zeroground

[code=c++] float x1,x2,y1,y2; cin>>x1>>y1>>x2>>y2; float slope; slope=(y2-y1)/(x2-x1); float c=y1-slope*x1; cout<<"\nThe equation of the line is : y="<<slope<<" x + "<<c<<endl;[/code] is that it??

Member Avatar for toko
0
103
Member Avatar for rajatC

hi....well this is my first post in this community...i hope people here will help me in my doubts... I am an intermediate level programmer of c++... i have a doubt regarding the permutations of a given string and permutations of first N natural numbers... i have written a program for …

Member Avatar for Jishnu
0
231
Member Avatar for vs49688

@Ancient Dragon... i want to ask what does clock function return and in what format and with what units(milliseconds/microsec/sec) someone told me in this community that if u want the output in seconds divide the value of clock_t variable by CLOCKS_PER_SEC...and u will get the time in seconds.. I am …

Member Avatar for Ancient Dragon
0
96
Member Avatar for eranga262154

well both the methods are good....first with the [B]integer array[/B] suggested by gabs and second with [B]structure of two integers[/B] suggested by Slaem... but i think it is better to use the method suggested by your friend...[B]sending two integers by reference...[/B] i guess u dont know about the concept of …

Member Avatar for rajatC
0
123
Member Avatar for revenge2

@revenge2 i guess you have got the solution to your problem... PS: it's better to use switch in menu-input programs... [code=c++] cin>>choice switch(choice) { case 1: //code for calculate area //output and break; case 2: //code for calculate perimeter //output and break; default: //check for invalid input //ask for re-entering …

Member Avatar for rajatC
0
105
Member Avatar for HLA91

YEAH... gabs is right....it's simple..u can generate in any range.... what happenes is that rand() generates random number [B]irrespective[/B] of this [B]%n[/B]....anything can be used in place of n.... what we do is just take mod with n so that we can confine our randome number in[B] range 0 to …

Member Avatar for invisal
0
730
Member Avatar for rajatC

i m new to java...i made my first applet...a simple applet to showing "THIS IS MY FIRST APPLET"..but it's not working...i m not able to see it in mozilla firefox and IE7... plz help.. the code is here... [B]tryApplet.java[/B] [code=java] import java.awt.Font; import java.awt.Color; import java.awt.Graphics; public class tryApplet extends …

Member Avatar for rajatC
0
141
Member Avatar for rajatC

i want to calculate the exact run time of my program in [B]seconds[/B]....i used [B]clock() function of time.h library...[/B] what i did is that i made two [B]clock_t [/B]type objects... initialized one of them in the start of main() function and the other in the end.. and calculated the difference..as …

Member Avatar for Narue
0
193
Member Avatar for jrice528

well i m not getting what exactly do u want ....u dont want to use do-while but people are suggesting solution with while... what's the big difference???plz explain... anyways i m posting what i would have done :: [code] s.choice=1 while(s.choice) { print_menu(); cin>>s.choice; //you may check for a valid …

Member Avatar for WaltP
0
136

The End.