Beginners - August 2016 (Page 16)

Is there a difference between #ifndef FOO_INCLUDED_H and #ifndef FOO_H
 
I've noticed a couple of tutorials using include guards like: #ifndef FOO_INCLUDED_H and others like: #ifndef FOO_H ...is there a ...
[7 replies] Last: Thanks @booradley60 for the info. Though I haven't seems any issue so ... (by liuyang)
by loni
C++ Text-to-speech using Speech Synthesizer object
 
I’m beginner, need help I’m just trying figure out with Text to Speech C++ in Visual Studio 2015 on Windows 10 using Speech Synthesizer object from this l...
[6 replies] Last: Yes problem was with References / System.Speech now works but I'm stil... (by loni)
Converting hexadecimal digital to integer
 
I have the code below to convert hex digits to integer.But I want a char with all possible digits e.g. char s ="0123456789abcdef"; and calculate the integer val...
[6 replies] Last: If you can use C++11 features, you could try to do it like: #includ... (by Nico)
question
 
i am supposed to write a program about how to find the position, reverse, average, search and finally after a loop exist by the user choose but every time i pic...
[5 replies] Last: @the ideas man I was trying recreate the error that Peter was referr... (by Bdanielz)
Beginner exercise problem
 
I wrote this code for tic tac toe (I am assuming its horrible but I am only beginning). The only problem i have is that if player 1(X) chooses 5 and then player...
[no replies]
Other way to write the same code
 
Is there a simpler way to rewrite this code and for it to have the same outcome? while(mark!=1 && mark!=2 && mark!=3 && mark!=4 && mark!=5 && mark!=6 && m...
[12 replies] Last: cin.ignore, (std::basic_istream::ignore): http://en.cppreference.com/w... (by closed account E0p9LyTq)
Pass by Argument + Return by Value= double copy?
 
Hello, I am a beginner, and I am not too sure if the following statements are correct or not. Since passing an argument by value creates a copy of it, and ...
[5 replies] Last: Thanks for your detail explanation, Andy. Now I understand what's goin... (by DannySun)
by roots
Class errors
 
I am getting some constructor errors and an ambiguous call here overload function #include <iostream> using namespace std; #include "Header.h" #includ...
[8 replies] Last: Okay, this is making sense to me now, thanks all. (by roots)
printf characters as hex in C
 
I want to count the character frequency in a string and print them as hexadecimal.How can this be done with following code? #include <stdio.h> #include <coni...
[8 replies] Last: "ab\tcd\ne\tf\n"; doesn't mean anything. It's (just) test data, which... (by andywestken)
Loop Factorial
 
I am using PLEASE as a beginner to get basic understanding of codes as an intro to c++. I am stuck on the following question: "USING A LOOP, multiply all of...
[2 replies] Last: #include <iostream> using namespace std; int main() { int total=... (by mertsamilgul)
by ztdep
how to input from the third row of a file
 
Dear friends: I want to read value from the third row of a file in to a Vector<double>. how to do it. the file has only one value in each row ...
[1 reply] : If there is only one value in each row, you can do infile.ignore(4) ... (by Arslan7041)
Problem with std::lexicographical_compare
 
I am trying to implement mVector<T>'s relational operators. The link is here : http://www.cplusplus.com/reference/vector/vector/operators/ This is what I have...
[2 replies] Last: Just a question : Can it be done without std::lexicographical_compare? (by Naughty Albatross)
This is probably a simple mistake but Ive honestly no idea why my program is failing
 
So just trying to create a simple menu as part of another program, It says there are no errors when I build it however when I try execute the code and type in a...
[11 replies] Last: Why is my solution not working? #include <iostream> int main() { ... (by closed account E0p9LyTq)
Printing to printer
 
I have written in C language quite a bit but I'm new to C++/Visual C++. Trying to write to the default printer from a Windows 10 box. I'm told that the followi...
[5 replies] Last: Well...I guess the short answer is "you can't get there from here". So... (by wxgeek99)
multiple definition of Character.getName() (1,2)
 
I have had a project rattling around in the back of my mind for about the past 16 years. It is an RPG game, but I work on it, a few years pass while I'm busy w...
[26 replies] Last: I looked in the Code::Blocks Project->Properties and it says that my p... (by msulli1355)
RANDOM NUMBER GENERATOR HELP
 
I want to make a do while loop that has a random number generator. I also want to be able to have a keyword like 'exit' that will close the program. #incl...
[8 replies] Last: FurryGuy youre a beast. thanks. (by fivestar)
by D3Mxon
Triangle's sides and angles with cosine, sine theory, top-up design
 
Hello. I'm stuck with this task. There is triangle, you input 2 sides a, b and gamma angle (angle between them) in degrees. I need to find alpha angle and outpu...
[1 reply] : Note that 3,14 does not mean what you think it means. Because of the... (by helios)
by loni
C++ line index in text document
 
Hello as beginner need your help I'm trying to make program which can write phrases into the text document, new line below previous, just in original order...
[3 replies] Last: One way you could do this. 1. Read your file line by line to a string... (by Bdanielz)
Unresolved external symbol
 
Hello! I'm running into a problem with my assignment. I'm trying to make a ring class with a template and a base class. This is my header. #pragma once #...
[2 replies] Last: You should never include a .cpp file in another one, only include head... (by closed account E0p9LyTq)
Why does this not work?
 
Why does this allways cout rock. #include <iostream> #include <time.h> #include <cstdlib> using namespace std; int main() { char play; ...
[4 replies] Last: You really shouldn't use the C library random functions srand() and ra... (by closed account E0p9LyTq)
August 2016 Pages: 1... 1415161718... 22
  Archived months: [jul2016] [sep2016]

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