Beginners - March 2019 (Page 5)

100 objects
 
Hello I have two files Principal.cpp and Individuo.h, I want to create a hundred objects of Individuo, what can I do? Thanks Principal #include <iostrea...
[6 replies] Last: Every individuo have random sctrings of fact and strings ... Is tha... (by keskiverto)
Pointer Problem
 
Hello. I have a problem with some pointers. I basically have two classes: DLLNode and SortedMap. What i'm trying to do is first make an instance of the Sorted...
[1 reply] : All you have at the moment are pointers to local variables. You need ... (by salem c)
by kenken
Runtime error. Terminate called after throwing an instance of std::length_error
 
I get a Runtime error which i can't understand. Please help! class A { private: string x, string y; double z; public: A(string,st...
[2 replies] Last: Thank you Jonnin. I made the function CreateA() as a void function and... (by kenken)
Iterators
 
I have just started working on iterators, and I assume this is very basic... why does not the following code work? It does compile, but I get a bad access erro...
[14 replies] Last: If you are looking to insert elements, that takes a little more work.... (by dhayden)
isspace issue
 
Need is space to detect space from single input characters and print out the responses below. seems (space) and (enter) are not working #include <iostrea...
[3 replies] Last: Thank you both, was so simple i cant belive i overlooked it. :) (by blackstar)
by ramp00
Problems with "||" operator
 
I'm doing a conversion between units, but when I try to check if the user enters the right input, I always get the error for invalid unit.. If I use just one of...
[5 replies] Last: #include <iostream> #include <vector> #include <algorithm> using name... (by lastchance)
by JayGln
Dynamic array access violation
 
I am working on a program that replicates the plinko game on the price is right. however my issue is that I am dynamically allocated a 2d array and having an e...
[12 replies] Last: There's also no point in resetting values after something is destructe... (by Ganado)
by Alb13G
trouble with sub/add negation function
 
I'm having trouble with the negation part of this Write a function that accepts two input parameters,computes the difference of those inputs by subtraction, and...
[3 replies] Last: Thanks Guys Got it! Appreciate the help (by Alb13G)
"VectorName" was not declared in this scope..?
 
Closed, pasting the error here helped me notice the issue. I missed one lowercase letter. And now I understand what the error was suggesting.. Looked like it w...
[1 reply] : Closed. ... Missed one case letter. :P (by PiggiesGoSqueal)
reading text file to vector os objects
 
Hello i'm having trouble while reading the contents of a text file to a vector of objects. the file has inside it: Block{ id value origin.x origin.y ending.x ...
[5 replies] Last: hi! thanks everybody for the answers! so, then i noticed that the err... (by Stauricus)
Won't output to file
 
Input to be read from file. Main to call functions. Program compiles and runs, but not correctly. Output file opens but nothing written to it. Sample of inp...
[11 replies] Last: Thanks for the input! This gets me going in the right direction (by ames1951)
Cannot Read & Store Data From File
 
Please Note: This is for a homework assignment, however , the due date has already passed. I'm doing this for the learning aspect only. I'm trying to read fro...
[7 replies] Last: Thanks for your reply @ne555! Sorry for my late reply. > ‘readFil... (by PiggiesGoSqueal)
Segmentation fault
 
#include<iostream> #include<cstdlib> using namespace std; /* Implements a divide-and-conquer, prune-and-search,triangular expansion algorithm to ...
[15 replies] Last: It looks like the OP's code is a direct port of the Pascal program in ... (by dhayden)
illuminating use of destructors
 
I stumbled over CABrouwer's post (http://www.cplusplus.com/forum/general/251463/#msg1107166), and this made me recognize that I have rarely understood how destr...
[5 replies] Last: > Yea, if Derived has a virtual dtor, it would be called. wrong if Ba... (by ne555)
Not work
 
please help ------------------------------------------------- Intel
[1 reply] : You seemed to already have a thread on the same program: http://www.cp... (by keskiverto)
Sleep alternatives
 
Hi, i'm new to this forum and i had a question. Are there any Sleep() alternatives? Because to me it seems like C++ should have a similar purpose comand.
[6 replies] Last: Use the <thread> libraries to do it, as salem c and Furry Guy poin... (by Duthomhas)
by wuwy
How to return struct array from function
 
Been browsing various forums, can't find anything that would explain on how could I return struct array from function. Basically I need to sort out the resul...
[5 replies] Last: With object parameters one has by value and by reference (&): voi... (by keskiverto)
by cash
overload operaror <<
 
I'm confused about how to use overload operator, My assignment is: You should use the overload operator << so that the printing of the vector can achieved by ...
[2 replies] Last: You should use the overload operator << so that the printing of the v... (by keskiverto)
Counting Sort
 
Hello guys! I'm using a count sort algorithm to sort certain number in the range of 0 to 50. Then display the numbers + their frequency. The problem is they ge...
[16 replies] Last: @Duthomhas. Thank you very much for your solution. This solutions ar... (by FreeSocks)
Function overloading
 
Hello, I would really like a fresh set of eyes on my code and see what I am doing wrong. I feel like I am messing something up with my strings, as well as so...
[3 replies] Last: Tiny mistake. On line 37, I said to use "while(choice > 0 && choice < ... (by zapshe)
March 2019 Pages: 1... 34567... 25
  Archived months: [feb2019] [apr2019]

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