Beginners - August 2013 (Page 21)

Man Overboard
 
Alrite, thanks for coming to my rescue... Im trying to return the length of a string, when a user inputs a name; #include <iostream> #include <string> int ...
[4 replies] Last: you can use getline(). prototype: getline(istream&, string&); Exa... (by IWishIKnew)
constructor initialization
 
what mean by 4th line of this code class cnn{ int x=0; public: cnn() :x(5) { } };
[17 replies] Last: No. Consider this: int foo = 42; Does it assign a value 42 to every... (by keskiverto)
Ignoring getch()
 
I was wondering if there was a way to ignore getch() after an amount of time has passed. Like, if i wanted the user to press a key within 5 seconds of me tell...
[8 replies] Last: One f the more easier alternatives for beginners would be to use _kbh... (by IWishIKnew)
STL string library
 
What functions from the STL String library is used for what.....thanks
[6 replies] Last: THANK YOU VERY MUCH (by willynilly)
New to C++ for API / Algo Trading
 
Hi guys. I am limited in experience with programming languages as I was simply never interested before. I started using VBA for my work, and my method of lea...
[1 reply] : am wanting to learn a very limited range of what it can do. Well onc... (by Script Coder)
by Aibsr
operator= implementation
 
Heyy I have implemented operator= but obviously i need another function for the iter because i get this error Error 1 error C2440: 'initializing' : cannot con...
[5 replies] Last: Here you have an iterator on your left. This is a container which, wh... (by Stewbond)
good compiler Not an IDE
 
What is the best compiler that doesn't use an IDE as well. Will "make" still work with C++. I run Linux and I feel like I like to be old school but thats only b...
[1 reply] : Install gcc, compile a file with g++ myfile.cpp look up more option... (by trollger)
Trying to limit input to int type (1,2)
 
[updated with new question @ post 13] Hello everyone I'm sure you've all seen this before, but I can't find the solution to my problem. I don't want any value...
[21 replies] Last: awesome, thanks a lot guys. I will spend some time studying everything... (by digital3ds)
by Aibsr
solving an error in my code
 
Hello In my code there are 3 classes, in 2 of them i have STL lists from the type of the other class Explanation: Class 1 has STL list from type class 2 and Cla...
[8 replies] Last: You are right i fixed all includes and it worked Thank you very much:)... (by Aibsr)
by mike99
Hexadecimal to signed decimal
 
HI, How to convert a 12 bit hex string into a signed decimal.Is there a direct function to convert a hexadecimal in string to a signed decimal inde...
[1 reply] : My personal favorite thing to use is std::string to do the job. #incl... (by kevinkjt2000)
Defining an enum inside a union
 
Hello I want to define a union to store the various states of my game(like showing menu, playing, quitting, etc). And I made an enumeration as follows: ...
[4 replies] Last: Thanks for the help! (by The illusionist mirage)
How to convert vector to a stringstream
 
Hello, I'm writing 2 programs, first program does the following tasks : 1. Has a vector of integers 2. convert it into string 3. write it in a file T...
[1 reply] : i think it would be easier for you to manipulate your data. if you can... (by rafae11)
Could someone edit my code , i cant get it to compile
 
Hi there I dont suppose anyones got anytime to just to go through my code and spot any mistakes, im trying to get it to compile but its not working, the idea be...
[2 replies] Last: Thanks for that, ill do it now :) (by cedwards)
Problem with if else statements using char variable
 
I am trying to make a program that will display the mode of a Note in the key of C. For those who don't know music theory, this is what I want to happen: If ...
[3 replies] Last: #include <iostream> using namespace std; int main() { char inpu... (by Chriscpp)
mouse click
 
Need help to make the source code in c++ for left/right clicking on particular text and shape..
[12 replies] Last: If you're trying to make something like an IRC bot then you're thinkin... (by Computergeek01)
Can't read the first line of file!
 
So I finally got all this to work according to the prof. specification. However when it outputs the second output skips the second name. I know its a memory pr...
[4 replies] Last: Ok, So I followed many of your tips from the previous program but am r... (by masschamber)
Prevent people from type anything beside y or n in cin>>blablabla
 
To make it short. how do i prevent people from "typing" any key beside the one i chose (this case it's "y" and "n") when doing cin input. int startgame()...
[7 replies] Last: Yes, but he is only a beginner. I would not recommend that unless you... (by IWishIKnew)
What is the difference
 
What is the difference int units_sold = 0; int units_sold = {0}; int units_sold{0}; int units_sold(0); Thank you
[13 replies] Last: But what does this mean long double ld = 3.1415926536; int b = {ld};... (by keskiverto)
by JHEN18
array program
 
using one dimension array,make and run a program that will allow a user to input 20 numbers and sort them to highest to lowest.
[8 replies] Last: well lets say that this program will input only 3 numbers by changing ... (by closed account 28poGNh0)
by JHEN18
string
 
write a program that uses a function strcmp to compare two strings inputs by the user.the program should state whether the first string is less than ,equal to o...
[6 replies] Last: @keskiverto I agree with that tottaly and I feel shame contrubiting on... (by closed account 28poGNh0)
August 2013 Pages: 1... 1920212223... 51
  Archived months: [jul2013] [sep2013]

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