Beginners - May 2015 (Page 3)

More LNK Errors
 
I recently got more LNK errors when compiling my code: Error 3 error LNK2005: "class Shop s" (?s@@3VShop@@A) already defined in basic.obj C:\Users\Dylan\Docu...
[13 replies] Last: Yep that worked, cheers man :) I appreciate it a lot. (by FighterCoder)
Consistant portable pausing of the console
 
Hello all, I am trying to stop using the system("pause") command to pause the console, since I understand that it conjures demons, and will get me kicked ou...
[5 replies] Last: Yes. What istream::sync() does is makes sure that the input stream ... (by Duthomhas)
Please Review My Number Guessing Program
 
Hi, I just recently started learning C++, and the objective of my last project was to have my program asks the user to think of a number then it would attempt t...
[3 replies] Last: Well, the MultInputCheck looks like a good idea. It would be even bett... (by andywestken)
If statements not executing correctly
 
My first If statement always executes in the studentFeesCalc(char typeOfStudent, int hoursTaken) function, even when I enter a number that is not true in the st...
[5 replies] Last: Gamer2015 that makes a lot of sense, and thank you for breaking it dow... (by ctaylor4874)
Difference between postfix and prefix increments?
 
I always seem to get confuse what is the difference between postfix increments and prefix and how to use them. To be more specifically when do you know you need...
[7 replies] Last: Ok I understand now. Thank you for this. Yeah, I thought it did that,... (by closed account yR9wb7Xj)
Complex nUmber
 
I dont have any idea in complex number??How can i declare complex number ??how can i take input through complex number??how can i declare complex number through...
[1 reply] : Did you read the complex reference page? http://www.cplusplus.com/refe... (by AbstractionAnon)
Feedback on my first "real" program
 
Hello! I started reading the C++ tutorials on this site a few days ago and finally made it to functions. As a practice exercise I decided to write a simple tex...
[3 replies] Last: Meanwhile... I think the code looks good. A few minor points. 1. in... (by andywestken)
singly linked list
 
i just started reading about linked list and doing it from scratch int main() { struct node { std::string name; node *next; }; node ...
[8 replies] Last: That code works fine, I don't think it does undefined behaviour. (by shadowmouse)
If statement
 
Greetings. I'm having a problem with an if statement, and I was wondering if you could help me out. if ( xTest + 11 == 11 && yTest == 4 || yTest == 6 || yTes...
[4 replies] Last: if(xTest==0 && (yTest==4||yTest==6||yTest==8)) (by shadowmouse)
Solve Sudoku using Backtracking
 
I'm trying to write a program that solve a given sudoku puzzle after pressing enter. But the program terminated after pressing enter without doing anything. I t...
[1 reply] : I think there may be an error in line 119 ... The problem here is th... (by andywestken)
Abstract base class
 
Hi! I am writing a program and recent encountered a problem with the concept of "abstract class". In a simplified form, my problem is: I have a function f(x), w...
[4 replies] Last: Hmm, OK. I found that virtual function should not be declared as "inli... (by ttuethao)
Generic Programming: How to make things independent?
 
I've been thinking a lot about generic programming lately and how it can benefit me. Though I have came across something I'm not sure of. Either I am doing it w...
[4 replies] Last: I was suggesting maybe providing an abstract base class, from which t... (by megatron 0)
Character Arrays
 
Hello! I am new to C++ and I am having a difficult time understanding why the following code is not compiling. It says I'm doing an invalid conversion. I'm not ...
[2 replies] Last: ... oh my goodness. I'm so dumb. Thank you. (by jhykima)
Array - Diagonal
 
Hello all, I have a home assignment to write a short C++ program that would display an array of n columns and lines (square array) whose values would be dist...
[4 replies] Last: I'd say it is the smaller one of row and column-number. Thank you!... (by KANwa1987)
getline function and get rid of escape characters
 
Hello forum I am reading line from a file using getline and I want to trim any escape characters from the string read by getline. Any hint on that ? Thank...
[3 replies] Last: getting rid of them is not the same as trimming... to trim characters ... (by Gamer2015)
Write a file
 
In my game i would like to have a function that writes the balance of the player to a file, i have already made a file and got a function to read it and put it ...
[8 replies] Last: Okay cheers (by FighterCoder)
Finding the non-zero smallest integer in anumber
 
Hi.! I'm a beginner .. I encountered a question to find the smallest non-zero digit in a number.. This is my work till now.. I am unable to apply syntax to my l...
[1 reply] : nah, it doesn't work if the number has a 0 in it, you should check tha... (by Gamer2015)
Help for a little program
 
I've got one day to do this and I dont know what to do ..... Here is the Exercice : Create a class “School”, which contains 12 numbers – the number of...
[1 reply] : http://www.cplusplus.com/doc/tutorial/classes/ that should start you o... (by mutexe)
Array-pointer issue
 
Hello, everyone. I need your help. Consider the following fragment of code: int *nobody; nobody = new int(420); int **p; p = &nobody; // ...
[9 replies] Last: Thanks to everybody. The more I learn, the more I realize how little... (by PSYCHAMERON)
Output VS 2003
 
You see, i am making a FlyFF private server, but since it concerns c++ i am making a question here I successfully compiled all the needed files to be compil...
[1 reply] : What has this to do with C++? Google showed this: https://www.facebo... (by coder777)
May 2015 Pages: 12345... 40
  Archived months: [apr2015] [jun2015]

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