
please wait
by mausmani2494
How to remove an array's element using Delete operator
|
So I have a dynamic array. I know the exact position of the element(s) I want to remove from that dynamic array. my dynamic array: int *data = new int ;... |
Feb 26, 2019 at 12:35am
[10 replies] Last: there are 3 or 4 standard ways to 'delete' from an array. 1) you can ... (by jonnin)
|
by MrGreenz
Template help
|
How would one implement this: printContainer<Set>(words.begin(), words.end()); as a template class ? |
Feb 25, 2019 at 11:19pm
[1 reply] : What you've provided is a function that belongs to a class template. ... (by fiji885)
|
Dynamic Array |
#include <iostream> #include <string> using namespace std; int main() { int l; cout << "enter number: "; cin >> l; string* x= new string ; ... |
Feb 25, 2019 at 9:29pm
[5 replies] Last: got it Thank you (by Jack Van Stone)
|
by alexandrap98
Help on loops
|
Currently when I run my program, it will output all three results no matter which choice you pick. So if I were to say I want a Gold membership, it will output ... |
Feb 25, 2019 at 7:57pm
[2 replies] Last: Thank you so much! It makes a lot more sense with your idea of e, I do... (by alexandrap98)
|
by Cheddar99
Query about using #define directives
|
I realize the method below maybe isn't how one would usually go about setting up #define directives, but I'm wondering why I get the results I do: #include <... |
Feb 25, 2019 at 6:48pm
[12 replies] Last: That has nothing to do with it being not type-checked, though. You can... (by helios)
|
by clepina
Copy Constructor for complex classes
|
I am familiar with the simple copy constructors, and it worked fine with classes which members are primitives as strings or integers. However now I am trying... |
Feb 25, 2019 at 6:44pm
[10 replies] Last: [quote=clepina]It is probably because I have pointers in my classes T... (by AbstractionAnon)
|
by Majeek
Variable Sized Object May Not Be Initialized
|
I'm pretty new to classes and I'm trying to store data into each bunny created (Name, Age) But for some reason when I try to do std::string NameBunny = Rando... |
Feb 25, 2019 at 6:09pm
[4 replies] Last: Thanks! (by Majeek)
|
by Unspoken
How to use std::quoted with string?
|
Hi, I know that std::quoted is able write its output to the stream, but is it possible to use it with a string? #include <string> #include <iomanip> ... |
Feb 25, 2019 at 5:40pm
[18 replies] Last: If P1479 gets accepted you'll be able to write std::to_string(std::qu... (by Peter87)
|
space erase |
Hi, I am trying to write a program that erase trailing and front spaces of a string. The code I came up with does something weird instead, it repeats the inp... |
Feb 25, 2019 at 5:39pm
[10 replies] Last: this might help you: #include <iostream> using namespace std; int mai... (by ronny131)
|
by ramp00
Constructor error
|
Why do I get the error "no default constructor exists for class "Face"? I thought the Face(Point c, int r) function was the constructor in Emoji.h, and the Emp... |
Feb 25, 2019 at 5:11pm
[4 replies] Last: I see, I see.. Thanks a lot! (by ramp00)
|
by youbecha
Compiling old code failing at struct command
|
I am (attempting) compiling something from 2016 and the compiler (Cinder) has changed a bit since then...the code is choking on this... struct Cursor { ... |
Feb 25, 2019 at 2:49pm
[3 replies] Last: Followup... You shouldn't attempt to code when tired. I mentioned th... (by youbecha)
|
by cegodica
Questions about Quick Sort with the middle pivot
|
Hello everybody. Please help me with the following problem: I am learning algorithm Quick Sort. My teacher said that if I choose the middle pivot, there are ar... |
Feb 25, 2019 at 2:35pm
[4 replies] Last: Today, I met him again, watched the source code he wrote, and discover... (by cegodica)
|
by Bopaki
There is something seriously wrong with my C++ compiler today
|
I have just installed codeblocks 17.2 and I get the above message on the build log. and then nothing happens. Any help would be appreciated. #inclu... |
Feb 25, 2019 at 1:40pm
[3 replies] Last: Well, the cb_console_runner should show up as a pop-up... not sure wha... (by Ganado)
|
several functions |
Hi, unfortunately I feel a bit lost. I am supposed to write a program by first of all declaring all the functions needed and then adding functions definition... |
Feb 25, 2019 at 12:39pm
[3 replies] Last: I usually put {} on one line statements as well, as a style thing, wit... (by jonnin)
|
by cash
only function calls in main
|
My code shouldn't have any calls in the main other than function calls. However, I keep on getting errors when I try. How should I properly do it? #in... |
Feb 25, 2019 at 12:25pm
[5 replies] Last: Salem's answer isn't bad, though. Turn old main into a function. Ca... (by jonnin)
|
by MikelLiew
Difference between throw and throws
|
I am trying to learn what is the difference between throw and throws, was unable to find code explanation online except in Java style... could someone provide m... |
Feb 25, 2019 at 8:54am
[3 replies] Last: It's a keyword that has been proposed for a new type of exceptions ("Z... (by Peter87)
|
by yat89
insert function
|
Hi everyone. I'm new to c++. Currently I'm doing project on vehicle routing problem in waste collection. Given 4 set of routes as follows: 0 3 4 5 6 7 8 9 1... |
Feb 25, 2019 at 6:01am
[5 replies] Last: Hi Handy Andy and ne555 , I had made some improvement to my code. ... (by yat89)
|
by chocotaco
Modifying Records and delete
|
Okay so I'm working on a program that is supposed to modify, delete, and add records I have written some of the programs but I was curious if I'm going in the r... |
Feb 25, 2019 at 5:13am
[1 reply] : Consider a couple of utility functions. bool readMusicLine(ifstream ... (by salem c)
|
by Numb3rsGuy
Read from TXT file to data structure
|
I trying to create a program that takes a file that consists of an amount of Employees, then each employee ID, First Name, Last Name, Amount of Sales, and then ... |
Feb 25, 2019 at 4:59am
[1 reply] : Before you get to assigning anything to your struct, start with ... (by salem c)
|
Sorting strings by alphabetical order (in an array using a struct) |
Please Note: I did post a question already for this assignment, however , this is a new question and my code has changed a lot since the original post so I fel... |
Feb 25, 2019 at 1:03am
[9 replies] Last: Ah okay, yeah probably. Thanks (by PiggiesGoSqueal)
|