Beginners - July 2015 (Page 31)

by h4ever
Error with const wchat_t
 
There is a class Link, with private variable std::wstring _name; Method name() returns c string: inline const wchar_t * Link::name() const { return _name.c_...
[4 replies] Last: Oh so, thank you very much! (by h4ever)
Book(s) vs Internet
 
Should I buy a book or should I download an e-book or should I watch videos (ex. TheNewBoston)? Extra question: I would like to be an game developer. 3-D is...
[6 replies] Last: Sign up on udemy.com because they have lectures videos on C++ and more... (by closed account yR9wb7Xj)
Program cannot exit this while loop
 
Below is my code. It seems that I cannot exit the while loop event though I have used the break statement. Whatever string I input to the first question, the p...
[3 replies] Last: Thanks guys! (by TheHippoCritic)
Question about selection sort
 
void Sort(int array , int size) // Function to sort array selection { for(int i = 0; i < size; i++) { for(int j = i+ 1; j < size; j++) // What...
[1 reply] : for(int j = i+ 1; j < size; j++) // What is use of this and This l... (by shadder)
by Yulia
Copy Constructor
 
This is the sample here in cplusplus tutorial about copy constructor. I am trying to understand on which initialization the copy constructor was needed to be u...
[8 replies] Last: http://en.cppreference.com/w/cpp/language/rule_of_three Whenever you ... (by MiiNiPaa)
Class functions
 
Hello. I'm confused by this: const Stock & topval(const Stock & s) const; ... top = stock1.topval(stock2); And this: const Stock & Stock::topval...
[1 reply] : The first group of lines contains a function declaration ; on line ... (by koothkeeper)
Help with char/string
 
So i have this task to so search the text file for lines with more than 1 word. and i cant figure out how to search my string array like that. any help? i've ...
[8 replies] Last: No it is not checking to see if the line is a space, it is checking t... (by CodeWriter)
Question Regarding Strings
 
I am trying to make every repeated character in my sub_string to a '0'. But it is not going through the second loop that is supposed to set the index of the rep...
[1 reply] : The std::string.find() function is searching a string for a string. Yo... (by jlb)
Comparison based sort.
 
Hi, Im just wondering what is the difference between comparison based sort with other sorting algorithms like bubble sort, merge sort and selection sort. Or can...
[4 replies] Last: Thank you! It helps me :) (by closed account zwpL3TCk)
Question about learn all the member functions for string
 
Hello everybody. I am trying to learn all the member functions for string and I am having a hard time making a program that can find all the words that i want ...
[1 reply] : First of all, you do not need a iterator as no string search functions... (by MiiNiPaa)
Problem about output text in my Personal Project
 
I am having quite a bit of trouble just getting user input/ or even storing strings, etc. so let me lay out my problem. Personal Project, so no limits, I do li...
[1 reply] : Code is fine by the way. Just a little omission: std:: vector< std:... (by MiiNiPaa)
Can anyone help me? My program keeps crashing after 2 inputs..
 
Someone help please... this code keeps crashing after i input 2 strings for the array i created. i cant find out why its crashing... :( Write a program ...
[1 reply] : Please, do not double post. It clutters forums and spreads attempts to... (by MiiNiPaa)
Strings
 
Hello! I am currently trying to figure out why my code is getting the "segmentation fault (core dumped)" error message here. Any suggestions as to why this is h...
[6 replies] Last: @MiiNiPaa Thank you so much for taking the time to understand my code... (by jhykima)
Problem with PlaySound()
 
Hey all , i need help with playsound , i cant make 3 songs from 1 -3 to play in background one at the time. One starts , plays until end,ends and then another ...
[1 reply] : You're using && incorrectly. See: https://msdn.microsoft.com/en-us/... (by coder777)
why use namespace std?
 
Why do some programmers not use the line of code: using namespace std; Should I not use it? Is it just a short cut for beginners?
[5 replies] Last: http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-... (by MiiNiPaa)
Pure virtual called
 
I am running the following (https://gist.github.com/lakehanne/b601f96c07d1b02ede2c) and everytime I compile my cmake and try to execute the complied object, I ...
[1 reply] : That could be an unhandled exception. Try to find out the last execut... (by coder777)
weird problem in c++ logical operator ?
 
i was running this trivial program and whenever i wrote y or e or s it was printing yes! normally, now it doesn't print yes unless i press y only, what's wrong ...
[3 replies] Last: thanks for help, i have figured out a way ! #include "iostream" usin... (by mohamedeltair)
Web dev question
 
Hey all, I know this probably isn't the best place to post this but I figure it's a beginner question so may as well haha. Basically I'm (relatively) new to...
[no replies]
const function doesn't return char* (1,2)
 
Hello! Can anyone explain me why if I make the function get_fName a const function, it returns _fName only with the casting (char*)? Without casting, it not com...
[31 replies] Last: OK, that was very helpful. Thank you people. (by leonid1990)
by Winsu
constructor
 
I am making a constructor for a class which has a member of other class.I want to do a constructor which receive two arguments that are two object of a previous...
[16 replies] Last: I have two questions related with this function ostream& operato... (by Winsu)
July 2015 Pages: 1... 2930313233
  Archived months: [jun2015] [aug2015]

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