Beginners - November 2013 (Page 79)

by hilft
Can't understand the outcome! help
 
I do not understand why my compiler gives me 21 when I run the code below. From my understanding, it should give me 12. Can anyone explain me why? Side note...
[1 reply] : The order in which a.get() and b.get() are evaluated on line 13 is uns... (by cire)
by leo255
Finding minimum and maximum line by line (Fstream)
 
Pretty straightforward question here. I'm used to setting an upper and lower value for variables, and then seeing if a bunch of numbers are lower than that (lik...
[1 reply] : for (int i = 0; i < '\n'; i++) { What is the output for the ... (by cire)
operator"->"
 
Hi, I think this is an operator in C or maybe also in C++ my question is : what does this operator "->" do? sevalue1 = currMb -> mode or maybe you hav...
[2 replies] Last: It is exactly equivalent to dereferencing then using the . operator (u... (by Zhuge)
by Sigurd
Help with Template Class!
 
I'm learning template functions and template classes so I'm trying to do a Matrix class to do some operations like insertion/sum/invertible..etc and I came up w...
[2 replies] Last: So, what's the correct way?, I already saw that I need to use <int> in... (by Sigurd)
Cash Register?
 
I'm not sure if my functions are written properly, or if I'm incorporating them into my main code the right way. I'm getting a lot of weird output errors that I...
[3 replies] Last: Here is my fixed code. I'm confused on return types, I've pretty much ... (by dkarayof)
by JJ2233
Write a C function that approximates sin function.
 
Write your question here. Write a C function that approximates sin function so that you can answer the following question during the lab a) For a value of ...
[2 replies] Last: You could modify the exp(x) in: http://www.cplusplus.com/forum/beginne... (by ShodanHo)
by BC300
Obtaning the Average of An Array
 
I have to find the average of an array, but I can't get the program to run...I'm mostly following the sum function. I have tried using return average_array;...
[5 replies] Last: To the OP: why are you trying to use the name of your function as if ... (by MikeyBoy)
Random Unique Values and Arrays
 
Hello everyone, I've been working with arrays, and brushing up on my C++ skills while attempting to solve previously difficult problems. One issue I encoun...
[4 replies] Last: Hi Mats, I tried adapting the code sample above, but get unexpect... (by CplusplusAcolyte)
Saving EntityType information
 
Hi there I have encountered the following problem trying to write a library: I want certain classes (like e.g. an Entity class) in the library to include an Ent...
[no replies]
by Ltp
Round value problem
 
Hi. I need to round any integer value like this- 15 = 20 14 = 10 4 = 4 5 = 5 99 = 100 12345678 = 10000000 44444445 = 50000000 1445 = 2000 446 = 500 ...
[14 replies] Last: Thanks a lot charvil.. :) (by Ltp)
Every compiler crashes when i run this program
 
Ok, this might sound stupid but my friends challenged me to make a swastika in a matrix. Apparently every compiler i tried crashes when i run the program. I get...
[2 replies] Last: Apparently every compiler i tried crashes when i run the program. A ... (by keskiverto)
Why wouldn't my code run?
 
I am making a mastermind game that will have a user input a password or have the computer randomly generate it, it will then try to guess at the answer, and re...
[3 replies] Last: Your program gets stuck in the while loop in this function. If it is ... (by vin)
Reliable Online Resource For Java ?
 
Hi All , I have just started java programming . Please share online reliable resource for java beginners also recommend me some reference book.
[1 reply] : This is a C++ forum, if you're learning java then find a java forum yo... (by Uk Marine)
static function print static object
 
Hello.I have an exercise: Create a class containing an int, a constructor that initializes the int from its argument, and a print( ) function to display the ...
[2 replies] Last: Thanks.When I remove I from the line I S::obj an error occurs. This ve... (by fitipaldi)
Trouble with generating a random number
 
Hello! I am having trouble getting a pseudo-random number generator working. The idea is to pick a number between 1 and 999, then print it. This code using the ...
[3 replies] Last: Maybe the reason for the closely related numbers is because you produc... (by nvrmnd)
by gift81
an exchange: english lessons on lessons of the programming
 
Hi there! I am a software programmer and a teacher of programming in the past. I need to improve my english. So my propose is..you provide me english lessons I...
[no replies]
by Ltp
Round integer to integer
 
Hi. I need to round any integer value like this- 15 = 20 14 = 10 4 = 4 5 = 5 99 = 100 12345678 = 10000000 44444445 = 50000000 1445 = 2000 446 = 500 ...
[1 reply] : That is an inconsistent example. 14 => 10, but 14 45 => 20 00 D... (by keskiverto)
by Donna
Just need a nice push in the right direction
 
Hi lovelies, I am a little bit at a dead-end with the project I have been working on. I would just like to be pushed in the right direction on how a linkedlist ...
[13 replies] Last: Hmm its seems I can't figure it out. (by Donna)
by Ltp
Cstring problem
 
How can I check characters in a single string (i.e., how can I compare)? strcmp() compares two strings; but I need say for an example: "orange" I want to com...
[5 replies] Last: Follow a k n's advice. char *myBinary; cin >> myBinary; if ( myBi... (by abhishekm71)
invalid types 'int[int]' for array subscript
 
I wrote my code, and most of my errors are invalid types int int for array subscript and I have no idea how to fix it. fixed
[6 replies] Last: fixed the errors. I found out what I did wrong. Thanks guys. (by cplusbeginner)
November 2013 Pages: 1... 77787980
  Archived months: [oct2013] [dec2013]

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