Beginners - July 2016 (Page 26)

clang 3.7 link failure
 
Hi After downloading cygwin, clang and make, I am testing if the configuration works. I have written a "Hello world" C++ program and a make file to test this...
[4 replies] Last: Try uninstalling clang++ and dependencies and then reinstalling clang+... (by JLBorges)
Program is looping too many times
 
I've been playing and playing, but I can't get my program to loop quite correctly, I need getSize() to loop for as many characters are in 'string answer;' but n...
[2 replies] Last: Welcome to Hangman! The rules are simple! You get five tries to guess... (by Naughty Albatross)
Iterator on pointer to Object
 
Hi, i'm coding on an exercise for class, and can't find an solution. I've got a class Person class Person{ private: std::string name; int alter; ...
[5 replies] Last: It's part of the exercise. std::vector<Person*> was on the exercise... (by Vevonix)
by sengab
Problem with strings and characters (1,2)
 
Hi guys, How can I convert a string into a sequence of characters. I know that I can use char str ="hello world" for example, however in my case my string is...
[21 replies] Last: Sorry, I'm still confused. A string is already in effect an array of c... (by Chervil)
by aziz1
please help small problem ( making header file and c++ test )
 
Hi, I have an assignment due today that says javascript:tx('Write a C++ program that calculates the sum of three integers. Your answer should have three (3...
[18 replies] Last: You need to pay more attention to what your tutor wrote: Your answer... (by MikeyBoy)
Goto Skip Problem (1,2)
 
Hello there, i have this code and at the part with encrypt (goto) it cout first line and skipp all and return, i dont know how to fix this, can ya help me? Than...
[20 replies] Last: Told ya :) cin.ignore with all the other stuff makes sure the all t... (by closed account 48T7M4Gy)
Help with array question
 
Suppose that we are given the following code: int myArray = {1, 3, 5, 7, 9, 11, 13, 15}; for (int i = 0; i < myArray.length; i++) { myArray = 10 - myArray ...
[5 replies] Last: also add a cout statement inside the loop to see what the array contai... (by shadder)
What is difference between char* and int* data type to create array of pointers in C++?
 
While creating an array of pointers for int data type the following code works: int var = {10, 100, 200, 1000}; int *ptr = {&var , &var , &var , &var }...
[8 replies] Last: #include <iostream> int main() { const char* name = "great"; std... (by closed account 48T7M4Gy)
Does anyone know how I can get started on my Ouija board project?
 
Okay, my professor assigned us an Ouija board project and I need help on what things i need to get started. I don't need a full code but it would be nice to kno...
[2 replies] Last: Just an IDE if you want to run the program in a CMD window. GFX is ano... (by TheLoneWolf)
by elay
member intialization list and constructor
 
which one runs first? member intialization list or constructor body? because my constructors body needs to rely on the member which intiializes in intializatio...
[3 replies] Last: welcome :) (by Naughty Albatross)
Using Friends
 
I'm trying to learn using friends in classes, but I'm getting an error with my friend function #ifndef MONEY_H #define MONEY_H using namespace std; #include ...
[6 replies] Last: Perfect!!!! Thanks =] (by aerichsen)
Trying to take a value from inside a function
 
Hello! I am trying to do an assignment that requires me to use functions. In the second option "Display Total Daily Sale" I want to obtain the total amount of m...
[1 reply] : You can use either a class/struct if you know how or use global variab... (by a k n)
by FBHSIE
How does everything look?
 
This is one of the programs I did recently. I feel like I did a good job with this one, but I'm no expert, and I make silly mistakes. Anything I should chan...
[9 replies] Last: Nice (by MadAssassinV)
What is wrong with my flowers
 
So I have a flowers.dat file and my program is to read the .dat file and then I must write a while loop to read the input until EOF is reached, in the body of t...
[1 reply] : ofstream data_out; opens a file, but there is no file name. You are... (by closed account E0p9LyTq)
by CptPie
Parsing through every line of a file
 
Hey guys, I'm trying to write a program that detects certain things in a file and replaces them. To do this I have created a function to iterate through the fi...
[2 replies] Last: There are some basic approaches you could take to achieve what you wan... (by closed account E0p9LyTq)
How to assign questions in loop?
 
Hey guys I'm trying to get back into C++. I'm just experimenting with a program I created. I'm trying to get the user to answer a few questions in an assigned q...
[4 replies] Last: One reason to rewrite the menu utility using a vector is you could ran... (by closed account E0p9LyTq)
by Tmanto
Passing member function as callback to shared library function
 
Is there a simple way to pass the current instance of a non-static member function as a callback function in a shared library? The following structure returns "...
[1 reply] : Your member functions may be understood as //return_type name(class *... (by ne555)
I have played around with this loop some and the loop works fine but the math is coming out all wrong just cant get it. (1,2)
 
Not sure what change to make in the math I have changed variables around just can't get it. #include <iostream> #include <iomanip> using namespace std...
[20 replies] Last: Wow, that is amazing the loop broke fine I would have never seen how t... (by miah612000)
Need homework assistance
 
Can't figure this one out. Please go easy on me, im new to this. Keep getting error and don't know how to fix Assume that you have the following definition o...
[1 reply] : Write a C++ code to initialize each component of inventory as follows... (by jlb)
by sam80
NameSpace Declaration
 
Hello everyone, I am new in C++ and I want to learn it in depth. As the result I check internet and just manipulate codes and learn more stuffs. I want to ...
[16 replies] Last: bar::foo::gaz() (by closed account 48T7M4Gy)
July 2016 Pages: 1... 2425262728... 30
  Archived months: [jun2016] [aug2016]

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