Beginners - November 2013 (Page 38)

by sqoots
Urgent: How to get bool data to output to table?
 
I need to output the data from when my bool (seen below) is false, into the table (seen further below) //check the answers for invalid data else if...
[1 reply] : based on the title, do you want to print either true or false ? ... (by nvrmnd)
Searching a string in a file and converting string to int
 
I'm taking my first c++ class currently and have some issues with a searching files. I currently have a text file with SEC football scores from 2011 set up like...
[6 replies] Last: And when do you think it does it? string s1; int score1 = a... (by Chervil)
by axel97
String exersice
 
Hello everyone, this is my first time here. I need a little help for my last assignment of the year: I have to read a file and invert the order of the even wor...
[1 reply] : The number in the file helps, but you could write the program so that ... (by Catfish666)
Finding the actual size of an array
 
Hello guys, I'm new to arrays and as I was reading through I found that the number of elements in an array can actually be less than the size of the array e.g (...
[5 replies] Last: It's just a matter of using whatever makes the most sense in a particu... (by Chervil)
Can you use Const Int with decimals?
 
I am writing a program that allows the user to input a dollar amount and in return gives them the amount of pennies, nickels, dimes, and quarters in that dollar...
[2 replies] Last: I removed the "const double dollars = 10.0" because I want dollars to ... (by JokerFMJ)
by tkchau
Is it possible to use ostream/ofstream class as a function parameter
 
As ostream and ofstream are classes, I am curious if they can be a function parameter. Here's the code I have tried. #include <iostream> void test(s...
[2 replies] Last: Thanks a lot! (by tkchau)
Multiplying 2 strings (containing numbers) together
 
Hello all. Our tutor has asked us to multiplying two 2 digit numbers together, but they must first be placed into a string and it is the strings that must be mu...
[1 reply] : Well, you can't simply convert back to integer, multiply, and convert ... (by Ispil)
by Zips
Loop Help.
 
This is my first time writing a loop for a program and I cannot get an output I want so that my following function works. I have to write a loop that reads the ...
[2 replies] Last: Well, you can re-write calculateGrossPay() to take two values, one for... (by Ispil)
how do you change a string from uppercase to lowercase
 
I wanted to know how to change a string from uppercase to lower case without a loop. I've been trying to look for a solution online but cant find one. I thought...
[3 replies] Last: And if you are not allowed to use transform you can loop through each ... (by giblit)
Using Arrays in More Complex Problems
 
I need to create an array that can store 10 strings. This array represents the class roster. The following menu is displayed on the screen : Enter A for add...
[2 replies] Last: This is what I have now. If more than 10 names are entered, "Sorry, cl... (by super n00b)
Best option
 
We can call a function by value by reference by pointer , we call it by reference and pointer if we want a speedy process by value if want to keep it safe but w...
[2 replies] Last: Thank you link was good too. (by Sharan123)
2-D arrays
 
How would I go about creating a 2x3 2-D array with user input. In my book shows an example with the arrays already defined and I understand the example. I don't...
[1 reply] : Here is a very basic example: #include <iostream> #include <string> u... (by thepox)
by clodi
simple question on arrays!
 
*( pArray + i + 1 ) = *( pInternalArray + i ); I am copying one array to another one with a "shift" of 1. The trouble is: 1) *( pArray + i + 1 ) ...
[4 replies] Last: You are probably just going past the bounds of the array, and accessin... (by TwilightSpectre)
While loop problem
 
For this program I want the menu to loop at the end of a result of any case, however if they press 5 the program will exit. What happens is the menu display...
[2 replies] Last: Thanks, I've updated the code. So I have got it working now however if... (by mjci4mo)
Help with void functions
 
This function is suppose to return 55 but every time I run it it says "The sum is 0". I have tried switching out the values in the void function, switching the ...
[7 replies] Last: Thanks for all the help! After reading the replies, switching the voi... (by alyssnyx)
by sky3
Function not reading in Data
 
I cant get my function to read in data from my file. Ive tested it with multiple couts (mainly if(!inData) cout<<"no data"; and itll print no data. No idea why...
[3 replies] Last: Use the whole path to the file and see if that makes a difference. (by vin)
Student Score/Average Array
 
I have to make a program to find student's test scores and etc. I am stumbled on a few problems I can't seem to figure how to implement and create the following...
[1 reply] : Any help would be appreciated (by canucksfan1)
can't get program to read file
 
The program only outputs a black screen, nothing else. I'm not even sure if I got the program to at least save the first line of the file to use in comparison...
[1 reply] : You're trying to open the file twice here. You don't need the second o... (by yulingo)
multidimensional array
 
Write your question here. scanf("%s" , &rec ); scanf("%s" , &rec ); printf("%s\n","rec "); printf("%s\n","rec "); if input for rec is cho...
[1 reply] : The error is probably in the code that you aren't showing here. You sh... (by yulingo)
Searching an Array
 
For my assignment I had to finish a program using 3 pre-set functions and the program had to tell you if the number you entered was in the array. We had a txt. ...
[7 replies] Last: well, I'm the wrong person to ask about that. I do think a good book (... (by Chervil)
November 2013 Pages: 1... 3637383940... 80
  Archived months: [oct2013] [dec2013]

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