- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
Sorting algorithms are an important part of managing data. There are many sorting algorithms. Each algorithm has particular strengths and weaknesses. You are asked to write two programs in C++, one for Insertion Sort and another for Merge Sort. Compare the execution time for both programs for different data sets. … |
|
So I'm using the >> operator to read objects from a file one by one. I am simultaneously counting the objects and need to read them again one by one to print from a certain point. inFile.clear(); inFile.seekg( 0, ios::beg); Doesn't seem to work for me, and I assume it … |
|
A program that will create scrambled words by circularly rotating the middle characters of each word by 1 character. Place the scrambled words, 1 per line in an output file. Example: hamster becomes hmstear Sample input file: 4 dog pepper marker teapot Sample output file: dog pppeer mrkear tapoet |
|
so I haven't used pointers to this extent for a few years so I'm a little rusty. I'll give a quick explanation on what the code is supposed to do, but from looking at my output I am messing up pointer arithmetic somewhere along the lines. I'm pretty sure it's … |
|
I've recently created a .dll project in Visual Studio using C++. I'm curious how Visual Studio is creating the ability to link the files. I got everything working properly but it seems I can get the project to work flawlessly regardless of where the .dll file is located. Once the … |
|
I've attempted to create a linker for assembly files, what the program does is not the issue here though, I havent used pointer arithmetic in a few years and am definitely rusty in doing so. I'm getting a segmentation fault when I attempt to run the file and would like … |
|
I'm trying to use the system call to append an arbitrary number of files to one specific file... when I attempt to run the program i get the error: sh: addints.o: not found sh: main.o: not found sh: rbyswt.o: not found sh: readint.o: not found sh: writeint.o: not found sh: … |
|
I'm writing a program where I take in a file and need to grab strings of n length (n = 3, 4, 5, 6 ,7 or 8). The issue I'm having is I need to grab these strings in a specific window. So if n = 3 I need to … |
|
I'm creating a fibonacci program in mic1, which is a little more readable than other assembly languages so even if you don't know the language it shouldn't be hard to figure out what the code is trying to do if you are good with stacks and recursion. This is the … |
|
I'm working on a project where I have an executable file and the main function to the executable. The executable takes in 6 strings, one at a time, if the string matches what it is accepting then it will request the next string. The project is to use gdb debugger … |
|
I'm trying to create a program to add two IEEE 754 floating point numbers, I'm pretty far into the program but I've come to a halt in the bit shift section of the algorithm. I have created a tmp variable to copy the mantissa(0's and 1's inside the char array … |
|
Ok this has been annoying me for months but I've finally decided to act on it. My asus G50v(bestbuy version) is running excessively hot. Ive opened it up, the video card and cpu both have heat pipes going into a single cooling fan... My problem is this fan has died … |
|
Both the arrays contain 1750 characters each and the difference needs to be stored in third array. |
|
*I don't really know what to title this...sorry Hello everyone, I am taking a class to learn c++. But throughout the class all we did were make simple program using visual studio 08 with one source file. We are using C++ Programming :Program design Including Data structures by D.S. Malik. … |
|
I'm trying to create a menu using ncurses, I found some useful code and help online, but the code has errors in it. And I can't figure out why I'm generating this error. On top of all this, theres no way I'll be able to use the information I've found … |
|
I'm writing a game where I create a map using ncurses. What I want to try and do(if possible) is make the map the size of the terminal, in other words in the main program I have: [code=C++] // Create a game on an 80x30 map Game gameInstance( 80, 30 … |
|
I have an assignment where I'm supposed to "implement a class, Point that represents a point in a three-dimensional space." and im supposed to "carefully design the interface for this class and include functions that appear to be useful for operating on points." I'm not fully sure what this is … |
|
hey, i am new here but i have taken a few c++ classes. im having trouble with a very easy program and i just cant figure out why its doing this. ive looked around the forum already and didnt find anything helpful so i thought id ask. [CODE] include <iostream> … |
|
Can anybody help me understand how this design pattern works? I'm supposed to make a program that will create a tree using pointers or an array. The client is then supposed to choose which of the two types of trees he wants to use... I've created the tree with pointers, … |
|
I wrote a program which creates an n-ary tree using the left child right sibling approach. Each node of the tree is labeled by a dynamically allocated array of ints. I am currently having a problem where if I am searching for a node labeled 1 2 3 4 5, … |
|
I wrote a program to compare two text files character by character and its not working probably an easy thing im just not seeing. [code=c++] #include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, char *argv[]){ string s1; string s2; char c1, c2; if(argc !=3) { // … |
|
Ok im creating a program to make a database of people associated with a university, these people are called universitypeople, i have another file universitydatabase which stores all these people and will edit their information... well im having these errors when i type make... the errors could be class based … |
|
this is the error i'm getting. g++ main.cpp g++ universityperson.cpp /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crt1.o(.text+0x18): In function `_start': : undefined reference to `main' collect2: ld returned 1 exit status make: *** [universityperson.o] Error 1 I'm not going to post all the code i have but here is my makefile main file and universityperson files … |
|
So this is just the beginning of my questions, but I'm seriously having problems using classes in C++, I'm writing a program right now to plot points using asterisks on a 40 by 40 plain. right now I'm just trying to write the .h for the point class and i … |
|
My question: What is the output of the code corresponding to the following pseudocode? [code=text] Set y = 0 For (i = 0; i<=6; i=i+3) For (j = 0; j<=15; j=j+5) Set y = y + 1; End For (j) End For (i) Output y [/code] This is what I … |
|
I am supposed to create a program like this, with separate clock.cpp, clock.h, and main.cpp files. The program is supposed to do these tasks: I have started the clock.cpp and dont quite know where to go for some of the tasks, and I don't quite know how to use the … |
|
Write a new program called paginate.cc. It should work like this: Usage: paginate [--lines-per-page #] [--columns-per-page #] [--tabstop #] file [...] Required command line parsing: The options may be given in any order, but must all precede the file(s) to be printed. Parsing the argument should simply deposit the associated … |
|
What i have to do is read a string into a vector, then cop that vector into an array of character pointers, then for each element in the vector i have to allocate a new character array andcopy the data from the vector element into that character array. Then finally … |
|
I honestly don't fully know where to start with this program but this is what i have Write a MIPS program which read one line at a time from console. For each line that you read, print two lines on the console: echo print of the line and types of … |
|
I'm supposed to create a program to read in word by word into a vector. And print out the words connected with '-'... so if the input was hello world the output would be hello-world this is the code ive made so far... right now my input can be hello … |