Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 22 results for
exectuion
- Page 1
Grade book program using arrays and Bubble sort
Programming
Software Development
16 Years Ago
by xtheendx
…; score: "; grades[arraysize] = userinput3; num++ } } // function main begins program
exectuion
int main() { students.displayMessage(); students.getNumstudents(); students.getData(); students.sortData…
Re: Grade book program using arrays and Bubble sort
Programming
Software Development
16 Years Ago
by xtheendx
…; score: "; grades[numStudents] = userinput3; num++; } } // function main begins program
exectuion
int main() { students mystudent; mystudent.displayMessage(); mystudent.getNumstudents(); mystudent.getData…
Re: Grade book program using arrays and Bubble sort
Programming
Software Development
16 Years Ago
by xtheendx
…; i++) { cout << student_names[i]; } } // function main begins program
exectuion
int main() { students mystudent; mystudent.displayMessage(); mystudent.getData(); } [/code]
Program encouters a problem a needs to close everytime i run my program
Programming
Software Development
16 Years Ago
by xtheendx
…; "" << student_score[l]; } } // function main begins program
exectuion
int main() { students mystudent; mystudent.displayMessage(); mystudent.getData(); }[/code] [code…
Re: Grade book program using arrays and Bubble sort
Programming
Software Development
15 Years Ago
by xtheendx
…; " " << student_score[l]; } } // function main begins program
exectuion
int main() { students mystudent; mystudent.displayMessage(); mystudent.getData(); } [/code]
Re: Grade book program using arrays and Bubble sort
Programming
Software Development
15 Years Ago
by VernonDozier
…; " " << student_score[l]; } } // function main begins program
exectuion
int main() { students mystudent; mystudent.displayMessage(); mystudent.getData(); } [/code][/QUOTE…
Re: Grade book program using arrays and Bubble sort
Programming
Software Development
15 Years Ago
by xtheendx
…; " " << student_score[l]; } } // function main begins program
exectuion
int main() { students mystudent; mystudent.displayMessage(); mystudent.getData(); } [/code]
Sorting Multiple Vectors
Programming
Software Development
15 Years Ago
by xtheendx
… continue or quit char c = getch(); } // function main begins program
exectuion
int main() { students mystudent; mystudent.displayMessage(); mystudent.getData(); mystudent.End…
Re: Dialog Box alongwith Form
Programming
Software Development
19 Years Ago
by BinaryMayhem
when you call your second form do. formblah.show vbmodal then call your function right after that statment. vbmodal will hold
exectuion
of the parent window while the child window is open. This is why you can retrieve the value as the next statment in your code.
Re: Event not fired on reselection Frameset
Programming
Web Development
18 Years Ago
by Letscode
… loads and all the loading is over.Its not during
exectuion
that I'm having the problem but after execution. I…
Re: error in cstdlib
Programming
Software Development
15 Years Ago
by midimatt
…; myscene->initialise(); return; } void WorldManager::restart(){ } void WorldManager::exec_loop(){ //
exectuion
loop. render(); } void WorldManager::render(){ // Draw a scene myscene->…
Re: Change Title bar Font
Programming
Software Development
13 Years Ago
by nssltd
… readonly int WM_POWERBROADCAST = RegisterWindowMessage("WM_POWERBROADCAST"); /// <summary> ///
Exectuion
state enum for disabling standby. /// </summary> [Flags] public…
Re: Grade book program using arrays and Bubble sort
Programming
Software Development
16 Years Ago
by Lerner
Look at the last function you wrote before compiling for the last time. Assuming there were no errors before writing that function then the errors should be somewhere therein. If you didn't compile until after you wrote all of that, then shame on you. You can work it out yourself by going back and commenting everything out down to the bare bones…
Re: Grade book program using arrays and Bubble sort
Programming
Software Development
16 Years Ago
by Lerner
I don't see any istream functions being used in getData() which according to the comments is supposed to get student info from user. It's a little much to ask your computer make the data up itself, though I swear sometimes it does just that. Better to empower the user to do what you want them to by using a istream function or two.
Re: Program encouters a problem a needs to close everytime i run my program
Programming
Software Development
16 Years Ago
by Salem
Three key lines [ICODE] int numStudents = 0;[/ICODE] [ICODE]vector<int> student_score(numStudents);[/ICODE] [ICODE]cin >> numStudents;[/ICODE] Now, how long is student_score really? You get how many there is at the time you ask. It doesn't create a reference which tracks all future changes to numStudents. Rearrange …
Re: Grade book program using arrays and Bubble sort
Programming
Software Development
15 Years Ago
by Lerner
In line 2 of the following code snippet you try using numStudents before it has been given a value. Your options as I see them are to move love 2 to below line 4 and keep the same code otherwise or to declare student_names with the implementations default vector capacity and use push_back() to fill the vector instead of assigning values to the …
Re: Sorting Multiple Vectors
Programming
Software Development
15 Years Ago
by John A
Make a class that contains the firstname, lastname, and score. Now overload the '<' operator for it so that returns the object which is 'smaller' in terms of lastname. Finally, run std::sort on the entire vector, which will in turn use your overloaded operator< for your class.
Re: Sorting Multiple Vectors
Programming
Software Development
15 Years Ago
by Radical Edward
You should abstract your data into objects so that it's easier to make changes and the design is clearer. Right now you have three vectors of data that should be encapsulated in a student class: [code] class Student { std::string _firstName; std::string _lastName; int _score; friend std::ostream& operator<<(std::ostream&…
Re: Grade book program using arrays and Bubble sort
Programming
Software Development
15 Years Ago
by Lerner
You can't use the standard sort() function to accomplish your task, sorry. Since you have three separate vectors contaning linked data (sometimes this is called parallel arrays or parallel vectors), you have to write the function yourself. Writing a bubblesort(), or some other sorting protocol, which swaps parallel indexes in all three arrays/…
Re: Sorting Multiple Vectors
Programming
Software Development
15 Years Ago
by vijayan121
another way is to use a "tag sort". ie. create an index into the vectors and then sort the indices, rather than the three vectors. note: this is usually done for efficiency reasons (swap a pair of integers instead of swap three pairs of strings). [code] // ... std::vector<std::string> lastnames; std::vector<std::string&…
Re: Sorting Multiple Vectors
Programming
Software Development
15 Years Ago
by vijayan121
stupid error in earlier code, corrected here: [code] // sort indices (tags) for( size_t i=0 ; i<tags.size() ; ++i ) for( size_t j=i+1 ; j<tags.size() ; ++j ) if( lastnames[ [COLOR="Red"]tags[j] [/COLOR]] < lastnames[ [COLOR="Red"]tags[i][/COLOR] ] ) std::swap( tags[j], tags[i] ) ;[/code]
Re: Sorting Multiple Vectors
Programming
Software Development
15 Years Ago
by xtheendx
hey man that worked wonders. I would ahve never thought of that because i have never heard of tags. but i defiantly learned somthing. thanks alot
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC