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

B.Tech Computer Engineerig student

Favorite Forums
Favorite Tags
c++ x 37
c x 1
Member Avatar for yamahammer342

You could try the scanf function... [CODE=c++] int h,m; scanf("%d:%d",&h,&m); [/CODE] You can enter the time as xx:xx

Member Avatar for Karkaroff
0
93
Member Avatar for Karkaroff

In the following code, the object is not being written into file in line 30 [ICODE]stfile.write((char*)this,sizeof(item));[/ICODE] When line 26 :[ICODE]stfile.read((char*)&ob,sizeof(item));[/ICODE] is hidden the object is written into the file. Please help!!! [CODE=C++] fstream stfile; class item { int code; char name[25]; int price; int qty; public: int getcode() { return …

Member Avatar for Karkaroff
0
132
Member Avatar for Esmerelda

hey! are you sure you are not lying about your name???:icon_eek: Its a good idea to use a screen name instead of your real name. But I don't think its nice to tell people that the screen name is your real name!!! Anyway, welcome abroad sis!!!:)

Member Avatar for jbennet
0
97
Member Avatar for Karkaroff

in the following code, getch() is executed before the file is displayed.! whats wrong? how can i correct this? [CODE='c++'] void ReadFile() { char fname[13],ch; cout<<"Enter filename : "; cin>>fname; strcat(fname,".mth"); temp.open(fname,ios::in|ios::nocreate); if(!temp) { cout<<"File does not exist!!!"; getch(); return; } temp.get(ch); while(!temp.eof()) { cout.put(ch); temp.get(ch); } temp.close(); getch(); } …

Member Avatar for Karkaroff
0
308
Member Avatar for Karkaroff

i posted this problem in C++ forum and people told me its impossible. I'm using a very old version of C++ and most of its features are very similar to C. So i thought maybe you people will understand what the problem is.... In the following code, getch() is executed …

Member Avatar for Narue
0
76
Member Avatar for Karkaroff

Please help me in self documenting the program below. All you have to do is, take a quick glance at the following code to see if you can understand what each part is doing. If you have any difficulty in understanding(at a quick glance that is!), please tell me, so …

Member Avatar for Karkaroff
0
241
Member Avatar for TheBeast32

u can make it faster by incrementing counter by 2 when divisibilty by 2 fails. u can further accelerate, by avoiding checking multiples of numbers already checked.(sieve of Eratosthenes) Read sth about it at [URL="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes"]http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes[/URL] also, [url]http://en.wikipedia.org/wiki/Primality_test[/url] will help. and... personally, i feel checking till n/2 will be more efficient …

Member Avatar for TheBeast32
0
106
Member Avatar for Karkaroff

Please help me in self documenting the program below. All u have to do is, take a quick glance at the following code to see if u can understand wat each part is doing. If u have any difficulty in understanding(at a quick glance that is!), pls tell me so …

Member Avatar for n.aggel
0
297
Member Avatar for Karkaroff

i made a program to evaluate an expression, "expeval.cpp" [find attached]. i then tried to go further..... i made the program to read characters from the keyboard and write it into a file["file.cpp",find attached]. if an expression is encountered, it is evaluated and the result is displayed after the line …

Member Avatar for Karkaroff
0
110
Member Avatar for Newton27

Newton-raphson iterative formula for f(x)=0; is [INDENT]x2=x1-f(x1)/f'(x1);[/INDENT] u have to find the root of (x^3)-a=0; so the formula is x2=x1-((x1^3)-a)/(3x1^2); or[INDENT]x2=(2x1+a/x1^2)/3;[/INDENT] In other words u got ur formula wrong. Now let us do the 100 prob with this formula- assume x=1 after Pass 1 x= 34 Pass2 x=22.695501 Pass3 x=15.195048 …

Member Avatar for iamthwee
0
125
Member Avatar for Karkaroff

Hi, I'm George from India. I'm doing my last year in school. I love programming. Here for some real programming experience. To learn from all u Big B's here.

Member Avatar for zandiago
0
42