- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 5
- Posts with Upvotes
- 3
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
48 Posted Topics
I am trying to figure out the time complexity for a best case scenario shell sort. I know worst case is O(n^2) and I think best case should be O(n^2) as well because even thought its already sorted it still has to break the array down into gaps and check … | |
I just finished with my first year of Computer Science in college and over the break I wanted to learn how to do output from a computer using a C++ program to control different I/O hardware. I was thinking I would start somewhere simple with something such as turning on … | |
Re: I recently worked on a project involving a website that interacted with an Android App and it was really fun to design. Maybe you could think of something cool like that. A data driven app would be cool. For example we did flashcards. | |
I didn't know where to put this but this seemed to be the best place. I took an internship this summer and found out that I will be doing embedded development in C/C++ and Linux for phones(land line voip stuff). This is bad for me since I have always been … | |
Re: [QUOTE=LevyDee;1208502]Hi, I have a homework assignment to copy the elements of one stack to the other except in reverse order. The algorithm is easy enough for me to figure out and implement. My only question is, I dont really understand how im supposed to add my own function to a … | |
I have the following php code: [CODE]$query = "INSERT INTO flashcards VALUES (null, '".$_POST['front0']."', '".$_POST['back0']."', ".$link.", ".$details.", NOW()); INSERT INTO bundleflashcardlink VALUES (null, ".$flashcardbundleid.", LAST_INSERT_ID());"; $result = mysql_query($query);[/CODE] which gives me the following error: [CODE]DB Connection error: You have an error in your SQL syntax; check the manual that corresponds … | |
I am a complete newbie on Prolog and I had a quick question. I want to write a function that takes no arguments and just does some asserts and retracts. Is this valid? [CODE]turnLeftFunc:- select(currentDirection(dir))->select(leftof(dir,turnDir))-> retract(currentDirection(dir)), assert(currentDirection(turnDir)).[/CODE] This is for a wumpus world implimentation. I want to be able to … | |
Re: I know this is a few days old but heres a good tutorial I like to show my intro students. Hope it helps. [url]http://coutblog.com/?p=5[/url] | |
Re: Narue thanks for that binary search bug that was really interesting I had never thought of that. | |
I am writing a bug tracking system and this is my first time using .NET. I will have a SQL database to store the bugs but I want to have a table on my main screen that will list the bugs from the SQL database and when the bug is … | |
Re: You cant call the constructor of the train class like that. Since you already instantiated the t1 object you want to do something like this [CODE]t1 = train()[/CODE] if you wanted to make a new train title myNewTrain you could do [CODE]train myNewTrain = train(4)[/CODE] I would also like to … | |
I've been recently getting into the world of blogging and I wanted to see if any of y'all had any suggestions for good blogs. Blogs I follow: [url]http://thewashingtonmistress.com/[/url] [url]http://blazingminds.co.uk/[/url] [url]http://biggovernment.com/[/url] | |
Re: He's retired. Most retired people I know don't do much. I know he went on a speaking tour trying to convince students to pursue Computer Science degrees. Like jonsca said I think he's active with his foundation. | |
Re: Sounds more like something you would do in php or asp.net. Check into those. | |
So I didn't know where to put this but I had somewhat of a newbie question. I am trying to create a blog for my friend. Its going to be a full fledged site and I want to store the blogs and be able to search on them later. I … | |
I used to keep up with all this back in HS but ive been so out of it for so long I have lost touch with all the new hardware. I am currently running a core 2 32bit laptop with 2 gig ram and I am thinking its time for … | |
I need to check if a named pipe is empty. I am cycling through about 10 of them and if its empty I don't want to block until there is something in it I just want to move on to the next one. Is there any way to check if … | |
I am just starting with python and I am trying to write a program that interfaces with flickr. I am using the interface flickr.py found at the following link: [url]http://code.google.com/p/flickrpy/[/url] I am calling the following function: [CODE]myPhotos = myPhotoSets[0].getPhotos()[/CODE] The shell is telling me there is an error in this … | |
I am new to message queues and IPC in general. I am trying to have a process establish the queue and send a message. Then I fork and the child will read the message. The goal is to measure the execution time for different sized messages. The msgsnd is returning … | |
Re: I had that and it was because mspdb80.dll was missing. Check your directories and make sure nothing is corrupt. | |
Re: what text editor in putty are you using? Can you not map your network drive and just open it in wordpad? | |
I am trying to create a 2d array list but it is giving me a compiler error pointing at the first line of the function. I don't really get what is causing the problem. I am pretty good in C++ but Java has some new rules that I am trying … | |
Re: Your problem is in this line right here [CODE]age = (m * 100) + (y * 10000) + (d);[/CODE] I somewhat see what you are trying to do but that's a strange way of doing it. Try three nested if statements. For example to check if father is older than … | |
Re: Draw these out and trace through the algorithm and it will make much more sense. | |
Re: What is Variable? If this is a class that you have written make sure that you are including the file that holds the class in the file that is giving that compile error. When you try to declare your vector it seems like the program doesn't know about the Variable … | |
Re: Definitely read the links provided above but the short answer to your question is that pointers point to data stored on the stack and everything else is on the program stack. But remember, the pointer is on the stack and the data it points to is on the heap. For … | |
Re: [QUOTE=that_fox;1004513]I thought that when I put "point[y]=&sentence2[y];" it was getting point to refer to the memory space instead of the value. And then in the stripWhite function "sentence2[y]=*point[y];" was referring to the value within the pointer. Is that not using pointers? I'm sorry to say I'm confused when it comes … | |
I am a C++ and Java programmer and I just have a couple simple syntax questions that I can't find a clear answer to. Yes I tried Google. [B]Question 1: [/B]I found the following code on another forum. [CODE]typedef struct List { char* Name; char* Address; BOOL is_present }List_info; List_info … | |
I am writing a database API in C++ and I cant seem to think of a good way to handle the errors. For example if certain error conditions are met I would like to set some sort of error flag and allow every class to check that flag. I have … | |
I am just starting off in a haskell course and I am trying to write a program that takes a list representing an int such as [1,4,3] would mean 143, and convert it to binary and return it as a list in the same fashion. I have written the following … | |
Some of the code has been omitted. I am trying to write a DFS function to traverse a maze. It will eventualy add the nodes to a tree that I will traverse once I get the DFS working. Currently it goes into an infinite loop and I cannot figure out … | |
I the compiler is giving me the following error on the constructor of graph however it has been defined in the public section. Error [CODE]/tmp/ccku0faq.o: In function `Graph::Graph()': Main.cpp:(.text._ZN5GraphC1Ev[Graph::Graph()]+0x39): undefined reference to `AdjacencyMatrix::AdjacencyMatrix()' collect2: ld returned 1 exit status [/CODE] Here is my code [CODE=CPP]class Graph { private: vector<Node*> nodeList;//list … | |
I am trying to pass the size of the matrix array during the constructor but its giving me the following error. Is there a different way to do this? [CODE]In file included from Main.cpp:1: AdjacencyMatrix.h: In constructor ‘AdjacencyMatrix::AdjacencyMatrix(int, std::string)’: AdjacencyMatrix.h:13: error: ‘numberOfNodes’ cannot appear in a constant-expression [/CODE] Line 13 … | |
Re: Now that you have all the functions declared and data members declared all you have to do is implement the functions. For example you would want the function GetFirstName(void) to return the first name so just impliment them all and you should be done. | |
This is for a frequency table that will eventually allow me to build a Huffman coding tree. I want the class FrequencyTable to simply hold a vector of the type FrequencyNode however I keep getting an error about ISO forbiding the creation of the vector. Any ideas why? Error: [CODE]FrequencyTable.h:11: … | |
I am currently learning about heaps and specifically their relevance to priority queues. I don't seem to understand a couple concepts and was hoping someone could clear these up. First of all I don't understand the remove function. I get that it replaces the root with the last external node … | |
Re: Also note that a warning is different from an error. Code will compile and run with 100 warnings but it wont compile or run with even a single error. Warnings are little helpful hints given by the compiler. The no new line at the end of file is generally given … | |
Our task is to write a Binary Search Tree and the data has to be input from a .txt file where in the data is held as such [CODE]12345678[/CODE] Each digit is a new node in the tree to be inserted. My Binary Tree is working because I can just … | |
Re: A constant is not a type. It just tells the program not to modify that type for example you could have an integer const or a string const or a char const or any other type. Looks like you want an integer constant. I would suggest the following [CODE]int const … | |
Re: [url]http://www.cplusplus.com/doc/tutorial/arrays.html[/url] read that it might help. I am kind of confused on what you need to do. What is readSeq supposed to return? for example what is the int that it returns supposed to represent? The most recently read number? | |
I am trying to compile my program and I am getting alot of these errors: [CODE]Parser.cpp:9: error: stray ‘\200’ in program Parser.cpp:9: error: stray ‘\231’ in program Parser.cpp:9: error: stray ‘\342’ in program[/CODE] That sequence of three lines just keeps repeating and repeating. These are lines 8 and 9 from … | |
Re: [url]http://www.cplusplus.com/reference/clibrary/ctime/[/url] | |
I am trying to implement a queue based on a Linked List that I had to write previously. It is templated and for some reason I am getting the following error using g++ when I compile: [CODE]g++ LinkedQueueMain.cpp -o LinkedQueueMain /tmp/ccqwStpK.o: In function `main': LinkedQueueMain.cpp:(.text+0x2ee): undefined reference to `LinkedQueue<char>::operator=(LinkedQueue<char> const&)' … | |
Re: Your problem is that the account objects are going out of scope when the if statement ends and their destructor's are being called. Initialized it outside of the if else statement and then just modify it as needed in the if statements. If you don't know what I mean by … | |
Re: For future reference you should also realize that you could do this with a while loop for example if u want to keep going through the loop until a button is pushed that will make the button true as such: [CODE]int main() { while(buttonPushed() == false) { //perform your loop … | |
Hey does anyone have a basic binary multiplication function and or algorithm? I just need to record run times on it for varying amounts of input and don't want to have to spend an hour doing a solved problem for 5 points on a HW. Thanks in advance | |
I am trying to add sound into a whack a mole game for my C++ 101 class. I found this code on the internet [code]PlaySound("woofwoof.wav",NULL,SND_NODEFAULT);[/code] to add code and have it work the site says this: "It's defined in <mmsystem.h> and you have to link with winmm.lib." What does it … |
The End.