- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 8
- Posts with Upvotes
- 7
- Upvoting Members
- 5
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
Re: Something like this [code] #include <iostream> using namespace std; int main () { system("shut down -s -t 10"); return 0; } [/code] Shuts it down in ten seconds this is using dev c++ | |
Re: Winsock is commonly used in reference to types of C++ networking applications I recently find out that buying book is always better than reading online most of the time as a GOOD book will help you grasp the concept however here is a link to a fairly decent tutorial on … | |
Hello all, I am given a project and would like some help/guidance from the community. I am not asking for any code just a direction and little advice on how to approach this project or how these things work per-say. I am behind in my classes due to me having … | |
Re: So you wrote all this code and didnt bother to compiler and run it till the end? Tip: Working one function at a time, saving it, compiling, and debugging it, doing a small test of it if you can save you alot of trouble when you arrive to a sitution … | |
Re: Do you know how to google? The code for traversing a linked list is an easy concept, the only easy thing I thought easy about linked lists. [code] node *temp = start_ptr; //create a temp ptr to traverse your list while(temp != NULL) { if(whatever condition you need) cout<<"data"<<temp->data<<endl; temp … | |
Re: Usually when I work on a function I make it in main so If I get a error like a seg fault I take out bit and peices or rebuild the function test each small part and compile and run no error build on and repeat so I can narrow … | |
Re: Some very good basic helpful input on pertaining binary logic in programming. Binary logic is always funny even when designed simple logic gate circuits. Also to answer the OP, simply read the integers into an array of integers however in this case as donald stated binary logic is read from … | |
I need a bit of clarifaction here. When you allocate memory in a dynamic memory it is depending on however you decide to increment your max of your array, so if my objective was to delete a single object in the array I would do the same as a static … | |
For the life of me I cant figure out this simple task I know with a static array you just simple shift over one element and decrease the size in variable pertaining the length of the array as such [code] for(i = 0; i < n; i++) if(key == array[i]) … | |
I have a linked list containing the following data struct node { string name; int hours; node* next; } I have all function I've made so far working, adding indiviual node, deleting node, printing data in nodes, Ive made the program to read from a file upon execution to create … | |
Re: How convient I am on the process of the same thing, Ive skimmed over it a few times, not throughly enough to learn the concept but its a decent read [url]http://richardbowles.tripod.com/cpp/linklist/linklist.htm[/url] | |
Re: Out of curiosity are you taking cmps 260? We covered this recently. I wish I could be of some solution I am just curious because I am trying to learn the same thing | |
Ok, I am trying to figure out how to purse this current project which deals with dynamic allocation and linked list Here is the information I am given the following two structs [code] struct employee { int ssn; string name; float hours; assignment * list; }; struct assignment { string … | |
Re: Your making reference to function you have not defined or you simply type in the wrong name for the header file you are typing to include that contains this functions prototype, simply your compiler cannot make reference to the function you called check your spelling on your includes | |
Re: Ok, first follow forum rules quit double posting. Second, what do you know about C++? Not anyone can jump into such a complex project such as an IM client which I am hoping will has some kind of GUI, which requires learning Windows API to make basic forms, dialogs and … | |
Re: WHAHAHWHWHAT!? Type clearly! These are babies questions...read the book and you should know how to do these...I have the very same book and I am on templates and overloading. Here you go nub [code] #include <iostream> using namespace std; //This allows std be used globally with outh prefixing std:: int … | |
I have created a insert function which inserts the item in the template array, the position of the item in the array template list is depending on the ratio of wins over total games played, I have manged to work out the insertion sort if the two scores of a … | |
I have a program that reads from a file, and inserts the read items into a template array. Once that file is read into the array the second file is read, if there is a invald name ie name not int the array it is not updated. The second file … | |
Re: Or you can use the setprecision() function of the iomanip lib. [code] #include <iomanip> . . . . cout<<setprecision(2); cout<<//output data// [/code] | |
Re: Do you have any code you worked on at all? As the rules state above this section, we help those who show work. I'll help you get started [code] #include <iostream> #include <fstrea> file input output stream library using namespace std; int main() { ifstream fin; //declare fin as a … | |
I have the following driver for my template class the parameter being passed to the template is another class, the error I get is Error line 28 : templateclass.h std::ostream<<ballteam is illegal driver.cpp line 30 Where instationating templateclass<ballTeam>::print const () driver [code] #include <iostream> #include <fstream> #include "arrayListTypeT.h" #include "ballTeam.h" … | |
Re: Provided us with the code you have already. m and s as pointers? do you mean index variables? Why would you cut a square into circles? Your analogy is very confusing seems just like to me you need to produce a matrix with 5 rows 10 columns. Clear things up … | |
Ok, I have a given template class code the only thing we are to implement is inserting an item so that the template array list is still in ascending order my template passes the parameter of another class, this classes contains overloaded operators < > == based upon the win … | |
I previously asked how to install the CC compiler earlier, I decide to share my knowledge of how this compiler instead of g++ I installed this compiler because the CC compiler can handle separate template class files. I hope this is useful to some when looking for a separate C … | |
As seen in my previous post I had a problem with some code dealing with linking a template class, I emailed my professor and the g++ compiler cannot handle the seperate compilation of template classes. So now im stuck with no compiler, in labs we use the CC compiler with … | |
I currently have a template class, another class that is passed as the parameter to the template and a driver and I am getting these errors, I have no clue what the problem is. Also I have another issue with this project I need to sort out which is insert … | |
I was given a template class code here and I have to add the code to a insert function in there, I have no real experience with templates, how would I go about doing this ? here is the template class code.cpp [code] // Implementation of the templated version of … | |
I have the following code snippet which is the most important as you can see I have two arrays defined of two different classes, my main agenda is printing them both out in a single list in ascending order based on the .GetDay value in each array, however when read … | |
Wow sorry for so many edits I just need to swap the rest of my array of structs along with the day value now delete this post or post insight on how [code] int x, y; for(x = 0; x < l; x++) { for(y = 0; y < x; … |