General C++ Programming - March 2017 (Page 17)

Dynamic Arrays
 
Can someone help me create a dynamic array for my default constructor? This is what I have so far and it doesn't feel right at all. http://textuploader.com/dts...
[3 replies] Last: You can mix c and c++ to make a monstrosity like this to put into your... (by jonnin)
PPP2 Chapter 11 Exercise 3
 
The "disemvowels" exercise. Here are the specifications: Write a program that removes all vowels from a file (“disemvowels”). For example, Once upon a ti...
[12 replies] Last: bool is_vowel(const char ch); void print_word(std::ostream &os, std:... (by jlb)
2d array maze
 
I'm just going to go ahead and admit it, this is a homework problem. Please, please, please don't just write the answer. I do want to learn how to do this but I...
[no replies]
by elsa
template to return the "middle value" of an array
 
I've written a template to return the middle value of 3 distinct parameters. But now I want to re-write it using arrays. How would I go about doing that? Direct...
[3 replies] Last: #include <iostream> template <typename T> T findMid(T* a, const size_... (by gunnerfunner)
Circular Linked List
 
Context:Create a circular, doubly linked list from a file (input.txt), containing a list of names. The number of names is unknown. Prompt the user for the num...
[2 replies] Last: My apologies, I have been at this for quite some time now and have bee... (by ehsan96696)
I need help with this problem
 
Directions: Write a program that keeps track of a speaker's bureau. The program should use a structure to store the following data about a speaker: Name Tel...
[3 replies] Last: we don't encourage spongers, goodbye (by gunnerfunner)
Integral of a equation
 
Write a function to calculate the following integral ∫8z + 4z3 − 6z2 dz. Pass the coefficient as parameters to the function. The function must not return an...
[3 replies] Last: agreed, except I would have the index of the vector be the power of x... (by jonnin)
Need some help with this.
 
Problem: A local company, Molding Supreme, uses produces molds to cast various shapes. However, the molds become scratched after many uses and need to be repl...
[1 reply] : int main(){ // forgot the parentheses } cout << "Are there any o... (by Hengry)
Can I ask for help?
 
Please help me display the order summary properly if the customer ordered more than once. PS. My code's problem is it's only displaying the last input and...
[4 replies] Last: Sorry, I wasn't aware of this troll either, and that wasn't my intenti... (by LinuxWizzerd)
How Can I Stop The Loop From Asking For Input?
 
Good evening all, I need some help fixing the readgraph function for my minimal spanning tree assignment. This function reads a copy and pasted format such as t...
[2 replies] Last: Thanks a lot, my program is fully functional now. (by code4545)
Struct linked list with while statement
 
Hi, everyone i'm having some problems with an assignment. we are supposed to create a program using structured linked list, that uses one global variable to rep...
[5 replies] Last: global and static POD are zero-initialized. Oops. I knew that. Tha... (by AbstractionAnon)
Can extern and static be used together in a variable declaration.
 
Hi guys, I am trying to write a singleton class with a static pointer as a member variable and also a map variable. But if I use extern, in both the cases I ge...
[no replies]
Problem updating array and array pointer in "parallel_for" function
 
I'm trying to learn parallel programming, so I started by calculating prime numbers in parallel and loading them into a vector array. The problem I have is tha...
[4 replies] Last: JLBorges Thank you VERY much!!! This solved the problem!!! (by tigerlcf)
string to int
 
Hello, I am facing problems to convert a string(consisting of digits only) to an int variable...as no mathematical operations can be done in a string so, I hav...
[19 replies] Last: Hello Again... Sorry for that...I was late in getting back to this thr... (by kinjal2209)
Filling three arrays at once.
 
Hey, I wanted to know if there is a more efficient way to fill three arrays of different size at once than what I have here. #include <iostream> #include ...
[7 replies] Last: With these sizes const std::size_t N1 = 100, N2 = 10'000, N3 = 1'000'... (by JLBorges)
Linked Lists Problems
 
I am a college student trying to write a program that has a user enter a tracking number, type of animal, and boarding charge. If the user wants to enter more t...
[4 replies] Last: In my class we have not used vectors yet. Just using classes, structs,... (by crm2017)
A design issue. How to design when we include a header file in different header files and try to use them in a cpp file.
 
Hi Guys :), I am facing class redifinition error when I include a base class .h file in two different derived class .h files and then include these two heade...
[3 replies] Last: Thanks @AbstractionAnon :) (by kapil2905)
help with a function
 
im trying to get this program to run and i get errors that dont make much sense and i dont know whats wrong. #include <iostream> #include <fstream> #incl...
[5 replies] Last: void number_file (char in_stream, char out_stream); Line 8,27:... (by AbstractionAnon)
by B3b3L
Can some1 explain me this Problem!
 
Provide the implementation of the Update function that moves the object from his position to the destination with a speed of 2 meters per second. struct P...
[15 replies] Last: this is true, i called it time, its sort of pseudo code. the importan... (by jonnin)
Single Linked List
 
Hey guys I am supposed to write a cpp file with the implementation of a single linked list data structure that I am to define in an h file. The implementation o...
[1 reply] : First, please edit your first post to include code tags. Highlight th... (by doug4)
March 2017 Pages: 1... 1516171819
  Archived months: [feb2017] [apr2017]

This is an archived page. To post a new message, go to the current page.