Beginners - October 2016 (Page 13)

error LNK2005, i need help for that??
 
Hi everyone, I wrote my codes in my program, but i got this error every time when i compile my program<< Error 1 error LNK2005: "public: void __thiscall My...
[3 replies] Last: Finally, i solved my problem. i just change header and compiler from s... (by MRAziz2000)
Define friend function
 
I am going to be very honest here and admit that this is one of twenty homework questions I have in my C++ programming class. I have been able to complete all o...
[5 replies] Last: Like most things that don't make sense on this site, it is being done ... (by dragonfly95670)
Having trouble with this class
 
Won't compile the following is the input file. I'm sure I'm missing some stupid. Please help. Stocks.txt ABC 123.45 130.95 132.00 125.00 120.50 8.67% 10000 ...
[5 replies] Last: Thank you for mentioning that. It is fixed now. It basically told me t... (by dragonfly95670)
by JacobC
Splitting a Piece of Code into 2 Classes
 
Hi, I have written a fully functional "game" but I need to split the code into two classes. I was thinking about having a machine class and a player class. I ne...
[2 replies] Last: I think I may have gotten the solution. Thanks for the tip with the co... (by JacobC)
return 0
 
if 0 is false and 1 is true what does return 0 means ?return a false value to compiler !? am i misundertanding something here??
[2 replies] Last: There are two different uses here. If you cast an int to a bool , ... (by MZH)
How can I validate this 5 digit number (zipcode)
 
I need an easy method for validating a 5 digit number, in this case being a zipcode. Obviously what I tried didn't work as I wanted. Any suggestions would be he...
[1 reply] : A zip code is not an integer. Integers can't start with 0, whereas zip... (by MZH)
do-while loop
 
why do we use the Do-While loop? What's the point of using it? what is the difference between do-while loop and the for loop? What does the following loop do...
[5 replies] Last: do{ }while(true) if(true) while(true){ } They check to see if th... (by BHX)
by HotWax
getline is adding an extra space.
 
EDIT: I've figured out the problem. But thank you for checking in! Hello everyone! I'm just about finished writing a small program for my Computer Science clas...
[2 replies] Last: After I added inFile.ignore(); that's what it did but then I just a... (by HotWax)
Assignment Problem
 
I have an assignment for school that says the following: "Write a program that executes multiplication of two integers entered by the user, by using ONLY the...
[2 replies] Last: void f(unsigned x, unsigned n){ for(unsigned i=0; i<n; i++){ ... (by DrZoidberg)
2 dimensionals
 
This program is supposed to output the row and column of the number entered by the user but it is not working that way and honestly i am confused on how to do i...
[1 reply] : Why are you incrementing row after a match has been found? (by DrZoidberg)
No match for operator<<
 
On line 28 I'm receiving the error "no match for operator<<" followed by "note: candidates are". Could someone explain what the issue is? #include <iostre...
[3 replies] Last: Maybe you want to have #include <string> in the header? I should put ... (by lastchance)
Operator overloading
 
I keep getting errors from trying to set up a operator overloading function. The gist of the program is to sort arrays of two different data structures, by comp...
[4 replies] Last: The operator=(...) must be declared within the class/struct, not outsi... (by coder777)
C++ converting to template classes (operator errors and such)
 
EDIT: I fixed mostly everything and now I just have the following two errors in my AnyList.cpp file, though I'm not entirely sure if they're template related. ...
[3 replies] Last: Good point! (by gunnerfunner)
by alware
toitoi 1
 
Write your question here. Put the code you need help with here. #include <iostream> #include <utility> #include <fstream> #include <string> #inc...
[1 reply] : Hello alware, Please use code tags around your code. It gives it line... (by Handy Andy)
by gomega
C++: Accessing Text File to Organize and Display to User
 
Write your question here. I have a basic C++ program trying to access a text file, grab information from it, and then return that information in a organized fa...
[2 replies] Last: Thank you so much for your help! Everything is perfectly clear now. ... (by gomega)
Passing data between classes
 
Suppose I have two separate classes, Class A class A { public: int length; }; Class B class B { public: int width; int area() {return length * width;} }; ...
[4 replies] Last: AbstractionAnon, thanks; that seems to be the solution. The examples ... (by pharoah0110)
Generating all possible combinations of numbers under a certain number.
 
So im writing a program which finds pythagorean triples. I need to find a way to test out every single combination i can have with three numbers, all of them be...
[4 replies] Last: Hello @billy606, it seems you've started two threads for the same prob... (by gunnerfunner)
by fout
Function
 
I'm new to coding. I'm working on a class assignment that converts a zip code to a barcode. I'm stuck trying to figure out how simplify my code by calling a bar...
[2 replies] Last: Hello fout, Unless you come up with some kind of loop there is no sho... (by Handy Andy)
Product of only Positive Numbers/Loop and Continue Statements
 
Hello, I just need a little help with my coding. I need to write a program that asks the user to input 5 numbers and prints out a product of on...
[2 replies] Last: Some immediately obvious issues with this code: [code firstline=24] w... (by MikeyBoy)
LOOP Help
 
i am trying to have a way to make the program goback to the top of the while loop. When the user enters 'No' for their answer, i want to have the loop go back t...
[3 replies] Last: Hello fivestar, If you want to put an if statement in before the while... (by Handy Andy)
October 2016 Pages: 1... 1112131415... 51
  Archived months: [sep2016] [nov2016]

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