
please wait
by trisket
File output is null
|
So I have a programming assignment from class, I've coded everything how I believe it should be done, the code has no syntax errors, it compiles and runs, yet t... |
Apr 22, 2017 at 4:53pm
[5 replies] Last: @ Enoizat This prompted me to reread the chapter on functions. Thank ... (by trisket)
|
The iterator invalidation rules Problem. |
can an iterator be valid after insertion in vector ? i tried this code : vector<int> vec1 = { 1,2,3,4,6,56 }; vec1.reserve(20); auto offend = vec1.end();... |
Apr 22, 2017 at 2:31pm
[2 replies] Last: Thanks for replying @dhayden. I think it's now clear 😆 (by AhmedEl3agamy)
|
by amcclean147
Save () function
|
Hi there, I have received a piece of code I intend to use in a library but can't understand the following save() function. Class Person { private: ch... |
Apr 22, 2017 at 12:07pm
[1 reply] : The first "Save" line declares the save function. That means it tel... (by dhayden)
|
by sven
rational number
|
hi guys i need your help... i have my own library of rational number and now i want to found Arithmetic average of rational array in int main helm pe plz )) |
Apr 22, 2017 at 11:57am
[no replies]
|
by r13ayan
Why a garbage value is showing at the index (0) after sorting the array in ascending order?
|
#include <iostream> using namespace std; int main(){ int t; cout << "Enter the array size: "; cin >> t; char array ; cout << "\nEnter the values:\n"; ... |
Apr 22, 2017 at 7:58am
[2 replies] Last: Thank you so much (by r13ayan)
|
Using cin.getline() with files |
Hello, i'm taking a fundamental c++ course and a part of my newest assignment is asking me to read 100 characters from a file at a time without having any cut o... |
Apr 22, 2017 at 4:41am
[3 replies] Last: To do this from within the program (convenient if you are dead without... (by JLBorges)
|
by bacardiman
Runtime Error Help
|
So, my code is running without any compiler errors. However, when it outputs the results to the screen, I get the error _ctrisvalidheappointer(block). I know th... |
Apr 22, 2017 at 3:50am
[2 replies] Last: UPDATE: I believe that my issue would be that I need to de-allocate t... (by bacardiman)
|
by Alaanor
Program crashing at random points
|
I've been beating myself up over this, it's so frustrating. I'm using SFML but it should matter, anyway. What I'm trying to do is have a vector of enemies... |
Apr 22, 2017 at 3:30am
[1 reply] : It returns vector subscript out of range Since there's no use of t... (by mbozzi)
|
How to push_back a vector <struct> ? |
Let's say I have the following code: #include <iostream> #include <vector> using namespace std; struct something { int x; double y; char c; }; ... |
Apr 22, 2017 at 2:27am
[4 replies] Last: I would like to avoid using emplace_back since it was implemented in C... (by Oriol Serrabassa)
|
by TeriSerugi
Searching arrays that are a class.
|
How would i go about doing a sequential search on an array that is a class? This code is not working. Thanks for your help!!! int removeFromCart(CartItem ... |
Apr 22, 2017 at 1:16am
[1 reply] : A C-style array, such as the one you're using, can't be adjusted for s... (by gunnerfunner)
|
by gunman353
Instantiating object with function pointer as paramater
|
Basically I have class B, that in the constructor is creating two class A objects. One class A object is being sent a pointer to the function lessThan, and othe... |
Apr 22, 2017 at 1:01am
[1 reply] : First, an outline of the approach below: 1. have a template baseclass... (by gunnerfunner)
|
by caltice
Array with 10 objects and trouble with 2 errors
|
Hello everyone, first i apologize for creating multiple threads i will make sure to keep everything on one thread from now on. I an have the program compiling b... |
Apr 21, 2017 at 11:42pm
[5 replies] Last: Hi, caltice. Please, have a look at the following code and ask if spec... (by Enoizat)
|
by DirtyBlasion
A pointer with every word from a sentece
|
Hi there, I was trying to make a chat bot, that learns from human and generate a sentece, etc, etc, so the first step is to transform a sentece in a dynamic arr... |
Apr 21, 2017 at 11:29pm
[6 replies] Last: I just want to show me, where in my code is a mistake, and how I can c... (by DirtyBlasion)
|
by aspaceg
How to rand produce a c output.
|
Write your question here. #include <iostream> #include <string> using namespace std; char randn(char letters) //random definition { retur... |
Apr 21, 2017 at 10:29pm
[2 replies] Last: Awesome thank you so much gunnner! (by aspaceg)
|
by Boidoh
How to Implement these operator overloading into a class?
|
Hello. I have this code I wrote myself where I overloaded operators to add, subtract, multiply and divide fractions. I want to implement the overloading into a ... |
Apr 21, 2017 at 10:03pm
[2 replies] Last: Oh I thought that it would be able to work with fractions. Do you thin... (by Boidoh)
|
by AbeCode58
How to feed info from file handling into a struct
|
Hi this is the first time that I've posted on this forum and i am a big beginner at C++ so if my information isn't enough let me know. Basically i need a way to... |
Apr 21, 2017 at 8:09pm
[2 replies] Last: It depends where the information is coming from – if its from a file... (by gunnerfunner)
|
by Dagr
BigInt
|
Hi guys i have found many topics and references about big int and i want to know for what i need it an where i can found full code of it. |
Apr 21, 2017 at 7:16pm
[3 replies] Last: https://gmplib.org/ (by mbozzi)
|
by AnimeByDay
No matching function call to class member
|
Hello to day as the title says i'm getting a "no matching function call to 'ParkedCar::ParkedCar()' error on line 21 col 9 in the ParkingTicket header file and ... |
Apr 21, 2017 at 6:28pm
[2 replies] Last: OMG thank you i completely forgot i had commented them out to later ma... (by AnimeByDay)
|
by Lopus312
write line function
|
is there any function that allows writing to specific line? ex. #include <iostream> #include <cstdlib> using namespace std; int main() top: { cout << "word1"... |
Apr 21, 2017 at 5:59pm
[1 reply] : Hello Lopus312, Not that you should use a "goto" in your program your... (by Handy Andy)
|
Shifting array elements |
I have to write a program that reads 10 values from an input file and stores them in an array. It should ask the user to enter a positive number n and then shi... |
Apr 21, 2017 at 5:55pm
[3 replies] Last: Thank you guys it worked (by rockandrollhead)
|