sign up I login
 advanced
refer a friend - earn nickels!!
learner   learner is offline learner's messages in the community
Message
Catalogs Discussion Forums -> Computer Science -> Data management, class12, c++ -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
8 replies   

I do have an option for exit. But here, its taking the input correctly and even going to the display segment.


But it doesn't display anything there.


It doesn't enter the while loop at all(refer code). I don't know why.


I've tried manipulating the file pointers in several ways, but none seem to work.


Thanks for helping though!


If you have other suggestions, do post!

Catalogs Discussion Forums -> Computer Science -> Data management, class12, c++ -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
8 replies   

I'm writing a program for data handling using files in c++.


I have provisions for inserting, deleting, modifying and displaying records.


This is menu driven, hence after you do one of these, it prompts you for another action.


ie


while(ch)


cin>>ch;


switch(ch)


{case 1:  //insert


case 2://modify


//and so on


}


 


The problem is, once I modify an element, it prompts for another action, as required. This time, it takes the input but doesn't give the output. It shows output correctly in the next prompt.


What could be the reason for this?


Am enclosing relevant parts of code :


'file' is an fstream object tied to the concerned file.


//modification


cout<<"\nEnter itemcode of item to be modified ";

                  cin>>icode;

                  file.seekg(0,ios::beg);

                  while(file)

                  {     file.read((char*)&i,sizeof(i));

                        if(icode==i.givedata()&&file)

                        {  pos=file.tellg();

                           cout<<"\npos="<<pos<<endl;

                           cout<<"\nEnter new values\n";

                          i.getdata();

                           file.seekg(pos-sizeof(i));

                          file.write((char*)&i, sizeof(i));

                       }

                  }

                  file.seekg(ios::end);

 //display


file.seekg(0,ios::beg);

      cout<<"\nContents of file\n";

       file.seekp(0,ios::beg);

      while(file.read((char*)&i,sizeof(i)))

           i.putdata();      


         file.clear();

                  break;


 


Please help soon.


Rates assured.


Thanks:-)                

Catalogs Discussion Forums -> Algebra -> Determinants techniques -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
3 replies   

Thanks. So in the end its nearly all hit and trial, is it?

Catalogs Discussion Forums -> Algebra -> Determinants techniques -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
3 replies   

Hi !


Could anyone help me with determinant proofs in which you need to use properties?


It'd be great if you could explain how to identify sums and which property to use, or rather what techniques you use to recognise patterns in the determinant.


Thanks!


Rates assured!


:-)

Catalogs Discussion Forums -> Organic Chemistry -> suggest a good chemistry project for class12 -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
16 replies   

I did the verification of gas laws.


Try investigation of water samples


Or study the setting of cement


Or Extraction of iron from spinach leaves


Or experiment showing equilibrium


Check www.sirazenet.com/chemistry

Catalogs Discussion Forums -> Mechanics -> HC Verma Rest and Motioin Objective 1 -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
3 replies   

For q12, use :




 


 mod(Vab) =rt(va2 + vb2 - 2vavb cos @.)...............ie relative motion formula..




 


So for maximum magnitude velocity, @ =90..




 


Thus he should swim straight!




 


Simple isnt it,once you know the formula?

Catalogs Discussion Forums -> Mechanics -> HC Verma Rest and Motioin Objective 1 -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
3 replies   

For q13, make the triangle between one pulley, mass and the point straight above it.Differentiate length of string and you'll get the solution.


Try it.If you dont get it, visit :


http://www.goiit.com/posts/list/mechanics-please-fin-velocity-33091.htm

Catalogs Discussion Forums -> Computer Science -> is there any method to solve sudoku using c++ programming. (using 2d arrays & random no's? -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
1 replies   

hmm...one of my friends had done a sudoku game using C++ as 11th project...


So I think solving should also be possible!!

Catalogs Discussion Forums -> Coaching Institutes & Course Material -> Use of Brilliants material -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
4 replies   

Please reply someone!!!

Catalogs Discussion Forums -> Optics -> how is this possible??? -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
35 replies   

Principal axis of what?


See, the two parts cant converge...they just bend light...so there isnt any question of the two 'separate lenses' forming different images?


Why don't you just put a pencil in front of a lens and try to converge sunlight on the ground?


Just try it!!!

Catalogs Discussion Forums -> Modern Physics -> "ATTENTION" DO YOU KNOW THAT NEIL ARM STRONG HAD NEVER LANDED ON MOON>>>>>>>>>>>>>>>>>>>>> -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
47 replies   

But if all that is true, you mean to say the people who faked the photos were so dumb??


Moreover, in today's world, a fake like that wouldn't survive, there'd be a million people to pull it down...


What say?

Catalogs Discussion Forums -> Optics -> how is this possible??? -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
35 replies   

C'mon..its there even in 10th NCERT text,about mirrors.


Extrapolate that a little if you dont believe the reasons given by all of us!!

Catalogs Discussion Forums -> Optics -> how is this possible??? -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
35 replies   

@visa....see the figure given on page1....its just painted in the centre!!


What you are sayin will happen only if you BREAK the lens and SEPARATE the pieces!!

Catalogs Discussion Forums -> General Knowledge -> Why is the cloth dark when soaked in water? -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
4 replies   

Check it out :


http://www.goiit.com/posts/list/general-effect-of-water-33370.htm

Catalogs Discussion Forums -> Optics -> looks simple but isn,t so.why sun looks reddish at the time of sunset and sunrise????? -> Go to message
This Post 0 points    (Olaaa!! Perrrfect answer.   in 0 votes )   [?]
2 replies   

See the attached figure.


When the sun is at the horizon, the rays travel more distance through the Earths atmosphere.Hence they get scattered more, and red, having highest wavelength,travels faster.


When sun is overhead, it traverses less distance in the atmosphere and thus has less scattering.


This is also the reason why it looks bigger at sunrise and sunset.

 
 
Go to:   

Top Offers for goIITians
Correspondence Courses
Brilliant Tutorials
Narayana Institute
Aakash Institute
Classroom/Crash Courses
Narayana - Kota , Delhi , Others
Brilliant Tutorials - Class , Crash
Aakash Institute - Medical , Engg
Online Test Series
Brilliant Tutorials
Narayana Institute
Aakash Institute
Mahesh Tutorials
AMITY      Sri Chaitanya