Beginners - October 2013 (Page 20)

Character/String types
 
Hello, I'm trying to create a program that will ask the user to input letters and the program will print the letter in between those 2. Like for example, I ent...
[7 replies] Last: Ok, last question how does the computer know that A is greater than B ... (by sanasuke15)
Extremely new
 
Write your question here. cout <<"Hello World" ; I just downloaded the Visual studios express 2013 and am attempting C++. I've tried this in other...
[4 replies] Last: Thx for the help guys I really appreciate it. This will help me get st... (by Tim1010)
Do you need to read everything in C++ Primer?
 
I am reading C++ primer and it is a great book but it seems like some of it is only necessary in particular situations(decltype(), for example). Do I need to re...
[1 reply] : decltype is pretty common in modern code.. At least become familiar wi... (by Cubbi)
by jer311
Files and reference function
 
I declared my function prototype but I keep getting multiple errors when compiling . Any help? here are the errors. project6.cpp: In function ‘int main(...
[2 replies] Last: Thanks! (by jer311)
Issue with some code
 
Hi I am trying to teach myself programming and one thing I am currently working with is I want to basically create a math test, I want to write it So that It as...
[2 replies] Last: Thank you I was just getting so frustrated at it I guess I didn't thin... (by kodiake)
Read from file of arbitrary length
 
I have a .txt file containing 100 integers all on one line, each integer separated by a space. This is the code I have made to read this file and print the inte...
[1 reply] : just put your values in a container, if you need those values to persi... (by Cubbi)
using .find
 
I'm trying find only the values in this file that have a comma after them and then print them out while ignoring everything else. I'm having some trouble thoug...
[2 replies] Last: Here's a hint. Read about the return value of std::string::find() here... (by norm b)
What's wrong with this equation?
 
In quadratic equation ax^2 + bx + c, there are two possible values for x. These lines of code set the values of x to both of the possible values. However, these...
[2 replies] Last: Wow, thank you. I didn't actually think it was something that easy :( (by playitpro)
by Jort
Hangman program wont run correctly-
 
Write your question here. I have written a code for hangman but I cannot get it to run properly, it just exits when started. Can anyone help to tell me where I...
[1 reply] : 0 is the boolean value for false, not true. (by Ispil)
decrypter
 
Im creating a void that would read and decrypt some characters in a text file. 10 has been subtracted from the ASCII code, but I feel like im doing this functio...
[1 reply] : EDIT: its supposed to do the first 8 letters, hence the counter. Ho... (by Catfish4)
Having trouble with C string and File operations
 
I have a project for my systems programming class in which I have to create the history function for bash shell. I am trying to write out the input from stdin i...
[10 replies] Last: I figured out the problem, I had a dangling semicolon on the fgets() c... (by mothergoose729)
3 x 3 matrix
 
Hi everyone, below is my code, I am just trying to make a 2d 3 x 3 array. This code works so long as you are happy with the user inputting the 9 numbers necess...
[4 replies] Last: Thanks for the help, this works nicely. (by maximus123)
by aggsyb
Correct way of writing long or statements
 
Hey just been wondering this for a while , when I have an if statements with a ton of || in it. This is a super super simple example but obviously there will be...
[2 replies] Last: I've found that the need for these kinds of if statements are rare and... (by Disch)
by binso
Standard deviation problem.
 
Hi. I have written a code to calculate standard deviation. The program runs fine, but it does not give the correct outcome. For my numberOfentries I used 4 an...
[2 replies] Last: Hi, thanks for your reply. I found out the problem and resolved it. ... (by binso)
by gaz95
'=' not recognised
 
Hi, I just started C++ and to be honest I have no idea what i am doing, however i need to create a fairly simple program for an assignment so i found a calcula...
[2 replies] Last: Thanks, i honestly cant believe i wasted so long looking for that :) (by gaz95)
char equals an int??
 
I dont even know how to word this but... I am trying to make the program recognize a char and convert it to an int. I want to make the user decide whether the ...
[3 replies] Last: Thanks guys, I caught the mistake I did because I meant to enter in 't... (by wcsjunior)
cin.get and cin.ignore help
 
I am using cin.get and cin.ignore to get values entered by the user all at once with spaces in between each input. Example: 2 3 4 5 6 7 8 9 These values get p...
[3 replies] Last: As you can see from the documentation, http://www.cplusplus.com/refere... (by Chervil)
help with 4 random number
 
i need to have 1-8 make random on the cp1,cp2,cp3,cp4, but it cant be the same numbers and it needs to be different ever time. its for c++ and netbeans //so l...
[1 reply] : You can use a simple LNG, you will need to set a seed for the generato... (by Bourgond Aries)
Making own array class
 
I need to make a class called myArray that can start from any index, including negative numbers. Basicly solving the array index out of bounds problem, and i wa...
[4 replies] Last: so if I'm understanding correctly the code you posted saves a number ... (by Catfish4)
Help with Two Dimensional Arrays
 
Can anyone help with this program? Anything would be helpful...Thanks Guys. Write a program that creates and initializes two two-dimensional arrays 2 by 3 a...
[5 replies] Last: Looks like you have declared and initialized the two arrays okay. I r... (by Michael37)
October 2013 Pages: 1... 1819202122... 86
  Archived months: [sep2013] [nov2013]

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