Beginners (Page 68)

return 0 in function
 
How do you return 0; in a function? #include <iostream> using namespace std; int a(){ ...
[3 replies] Last: Thank you so much people! The problem is solved! (by BobTheZealotIsEpic)
Explaining a piece of code
 
Hello, this piece of code below is taken from a public member function of a class. Can anyone please...
[4 replies] Last: MiNiPaa Thanks for the explanation. (by Alqhtani)
ToUpper() and ToLower()
 
I would like to create my own ToUpper() and ToLower() functions (for my String class) without using ...
[2 replies] Last: Also you should check range of input to avoid conversion of non-letter... (by MiiNiPaa)
Do/ while help??
 
Write a C++ program that will calculate the average of each student, as well as the class average. ...
[2 replies] Last: something like: cout << "How many students are there?" cin >> numstud... (by closed account z6f9LyTq)
using a variable in function and int main
 
I have a problem with using variables in the int main and a function like a void . #include...
[6 replies] Last: The function tutorial (linked by Chervil) has a section about argumen... (by keskiverto)
by odin39
Where to define template classes and functions?
 
I have a decent understanding of how templates work and what their purpose is, but I'm having troubl...
[6 replies] Last: keskiverto, Good point, I didn't notice that when I simplified the cod... (by odin39)
lower than
 
Hi, I have a file, each line contains coordinates (x,z), i need to get the points where z<1.4 !! H...
[3 replies] Last: You can see it here: http://webcache.googleusercontent.com/search?q=ca... (by MiiNiPaa)
by CDavis
outputting multipule looping statements
 
I've been working on this program for school all day and after a lot of trial and error I have it wo...
[3 replies] Last: In for loops, you type the last condition like this: for ( int qui... (by BobTheZealotIsEpic)
by ohad
i want
 
i want that every pointer from the array of the second pointers array will point only 'n' letters fr...
[4 replies] Last: Shouldn't you name your question to your problem? (by BobTheZealotIsEpic)
operator+
 
I have created an operator+ function for my class string, but I have a problem related to the direct...
[7 replies] Last: [quote=zwilu]Should I overload the operator+ for all the situations th... (by Catfish666)
Returning a specific value for use
 
How do I return a specific value from a function in order for me to cout it in my int main? In th...
[2 replies] Last: Yep they all work just fine Thanks alot :D ! (by sidthekid2014)
Help with pass by value, and results by variable
 
I need help with my online c++ assignment. The instructions: A nutritionist who works for a fit...
[1 reply] : See section " Arguments passed by value and by reference " in http://w... (by keskiverto)
by p al
Erase elements from vector while iterating through vector
 
Hi guys, I am trying to erase elements from a vector that are equal to the 1st element of the vecto...
[6 replies] Last: Oh thanks! That was the problem! I hadn't included the header algorith... (by p al)
by gladi
Not reading my file.
 
I am using xCode on mac and when I want to run my program and give me ERROR: opening file - LOCTest....
[1 reply] : Try writing the file's absolute path. (by keskiverto)
by yepMe
Need to understand the logic of multiplication and addition logic
 
Hi Tech gurus, I am studying c++ using "Thinking in c++" now am in chapter 1 and solving the exerci...
[7 replies] Last: The idiomatic loop while( f >> word ) { /* ... */ } will execute onl... (by JLBorges)
by tdk93
Why isn't the value of y incremented after this, z = ++x||++y&&++z?
 
Why is the following program giving the output as y = 1 instead of y = 2? int x,y,z; x = ...
[4 replies] Last: Don't confuse operator precedence with the order in which the code i... (by Peter87)
Aggregation
 
Need help with aggregation of classes. Suppose class Passenger is aggregated to class Bus. Then how ...
[1 reply] : class passenger { /* ... */ } ; // CopyAssignable class bus { /... (by JLBorges)
by lays
how to shut down keyboard input buffer to directly react my key strike
 
I am trying to write a game which need to control the action. It is obviously bad to press enter ke...
[2 replies] Last: thanks. (by lays)
by tdk93
what's wrong with a>b?return(a):return(b);
 
What's wrong with the following expression? Why does it throw an error? (a>b)?(return a):(r...
[1 reply] : return a is not an expression. a>b ? a : b is an expression. Eith... (by JLBorges)
Returning array in C
 
I am writing a program that needs to return the number of values that are divisible by 3 and 7 and t...
[3 replies] Last: Instead of returning an array from the function, we can fill an array ... (by JLBorges)
Pages: 1... 6667686970... 81
  Archived months: [may2014]

Cannot post in this page. To post a new message, go to the first page.