
please wait
by siid14
Duplicate Symbol for architecture x86_64
|
(from an old problem, I found a new issue that I did not expect) I have the following error (see output) : Output duplicate symbol 'Rectangle::ya... |
Aug 20, 2021 at 9:09pm
[4 replies] Last: I moved the L40 from rect.h to rect.cpp. Ty, it gives me an acceptable... (by siid14)
|
samples |
Duplicate topic: http://www.cplusplus.com/forum/general/279580/ PLEASE learn to use code tags, they make reading and commenting on source code MUCH easier. ... |
Aug 20, 2021 at 8:40pm
[1 reply] : not quite ¿is there a problem with .getord()? you misunderstood the ... (by ne555)
|
by reversel
How to call void from a different class?
|
GUI.cc SomeClass::Dothing(); //A nonstatic member reference must be relative to a specific object SomeClass.cpp class SomeClass { public: void... |
Aug 20, 2021 at 3:30pm
[1 reply] : First, minor terminology critique: You don't call 'void', you call a ... (by Ganado)
|
floating point numbers precision |
Hello I'm solving some problem with doubles The numbers which I'm using are of order 10^7 I'm getting accuracy errors up to 0.1, how to avoid that My code... |
Aug 20, 2021 at 12:14am
[4 replies] Last: 240 lines is pretty small. Just post the code. (by helios)
|
by a7300235
confusion on unary_functions
|
//neccessary headfiles are included //"same" function class fun_with{ int operator()(int x){return x+1;}// function object }; auto fun_nwith = (int x... |
Aug 19, 2021 at 12:39pm
[2 replies] Last: fun_with is a type. You can't pass a type as a param hence the need to... (by seeplus)
|
by AkiraC
Favourite number in loop
|
Hi, I want to know how to "mark" the number as favourite number. Let say I enter number 2, and the output will show 2 is the favourite number. I only get to m... |
Aug 19, 2021 at 10:14am
[3 replies] Last: Just a bit of defensive coding: When using any of the scanf functio... (by TheIdeasMan)
|
by SubZeroWins
Passing pointers* to functions???
|
A little confused when it comes to passing pointers to functions? When you pass by reference &, the function that you pass it to acts on the address & does not ... |
Aug 19, 2021 at 8:40am
[14 replies] Last: Just because a C++ program 'provides the expected output' in one situa... (by seeplus)
|
by AkiraC
How to trace output?
|
How to trace output of this program? I don't understand how to trace the output It shows 1 0 0 0 0 2 0 0 0 0 3 0 0 0 0 4 #include<stdio... |
Aug 19, 2021 at 8:29am
[3 replies] Last: Use the debugger for your compiler. MS VS has an in-built one within i... (by seeplus)
|
by kalahan
Weird behavior when using stringstream
|
When I am using string stream twice it does not accept the value second time weird thing is same does work if the string passed before contains a space ... |
Aug 19, 2021 at 2:29am
[2 replies] Last: Thanks for the fast reply that was really helpful! Much appreciated!!! (by kalahan)
|
by noir234
Blank output when entering negative numbers
|
Hi we've been given the task to create a program to find out if the number that has been inputted by the user is an even or odd number and if its also a positiv... |
Aug 19, 2021 at 12:39am
[5 replies] Last: Correction: Modulo is implementation-specified for negative operands. ... (by helios)
|
by Zhylian
polymorphism
|
Hi everyone, I'm trying polymorphism for the first time. I'm getting this warning when compiling the codes: warning: deleting object of polymorphic class typ... |
Aug 18, 2021 at 6:43pm
[13 replies] Last: I couldn't hope for better. (by Zhylian)
|
by zEcs Cilnt
Divination Calendar/I-Ching Program
|
I'm going to say a bunch about what I am doing just in case maybe there is something easier I am only missing, but the point I am at is going into code. I have... |
Aug 18, 2021 at 6:27pm
[7 replies] Last: Jeeze, I was so excited I thought of a way to do it, I didn't see it w... (by zEcs Cilnt)
|
by RenziavdWalt
Error: expected primary-expression before ')' token
|
I have encountered a problem with my program. I want to receive a number from the user and then display a triangle with the amount of stars equal to that number... |
Aug 18, 2021 at 3:38pm
[3 replies] Last: The error is on L26. A for statement has 3 parts separated by ; (eg as... (by seeplus)
|
by SubZeroWins
Scope resolution :: woes
|
This is a sample program that teaches us unions & structs. Structs are public access-specifiers by default, so why do I need :: the scope resolution operator wh... |
Aug 18, 2021 at 5:13am
[5 replies] Last: When you say "must be a namespace" you mean the name of functions/met... (by helios)
|
by kdrewes
Password
|
Hi, I'm trying to figure how to read a username and password from a file using a map. I was able to write to the file but I am having difficulties reading the ... |
Aug 17, 2021 at 9:23pm
[9 replies] Last: Seeplus and Andy thank you both for all your help. This all helps a l... (by kdrewes)
|
by agirideep
Retail Item (OOP)
|
Keep getting logical errors. Printing empty output Main File #include "RetailItem.h" #include <iostream> using namespace std; int main() { int ... |
Aug 17, 2021 at 11:57am
[3 replies] Last: See http://www.cplusplus.com/forum/beginner/279521/ Apparently OP did... (by Handy Andy)
|
by Spamfilter
for loop exits with out iterating
|
When the maskList() function is called in the "if" statement, the for loop gets bailed on, instead of continuing to iterate like it is supposed to. I can't figu... |
Aug 17, 2021 at 10:23am
[7 replies] Last: @spamfilter - see my 'fixed' code above re prime numbers. There is a p... (by seeplus)
|
by agirideep
Car Class (OOP)
|
Does anyone know why I keep getting logical errors in my code? Car.h #ifndef CAR_H #define CAR_H #include <iostream> using namespace std; class Car ... |
Aug 17, 2021 at 10:04am
[6 replies] Last: Perhaps: #include <iostream> #include <string> class Car { int ye... (by seeplus)
|
by jhbardwell
Issues nesting enum within a struct
|
I am trying to nest some of my enums within structs so that I can use them in functions involving the other struct variables further down the line. I keep getti... |
Aug 16, 2021 at 6:56pm
[1 reply] : not having SDL, ... this works: const int LONGBUTTON_HEIGHT = 128;... (by jonnin)
|
by empleat
Array - exeption thrown, stack around variable was corrupted
|
What the hell is with arrays, I thought I Am doing that correctly already, but apparently not. It is one of these things I can't wrap my head around... #i... |
Aug 16, 2021 at 5:46pm
[6 replies] Last: You can pass an array to a function without it decaying to a pointer. ... (by seeplus)
|