Beginners - June 2012 (Page 37)

Why does this happen?
 
From the following code: int proc(int x, int y = 0) { return x + y; } int main() { cout << proc(5, 6); } Why does the assignment within function defi...
[5 replies] Last: Cheers (by Ramzi89)
Help needed with my assignment.
 
So I kind of started the program but I can't manage to make it work properly. Can anyone please help me make it work? //Create a program which lets the user...
[4 replies] Last: TS, this type of program really calls for a database and imo C++ is no... (by IceThatJaw)
by celuur
Compilation error with vectors (no matching function for call)
 
Hello all! Been reading the forums all semester to try and debug and understand my runtime errors, never needed to actually post until now! I'm currently tr...
[3 replies] Last: I took a look at the documentation on here for vector.insert and it sa... (by IceThatJaw)
How can multiple answers work?
 
How would I format this to work? getline (cin, mystr); if (mystr == "good", "well", "okay", "fine", "terrific", "swell", "excellent", "decent", "awesom...
[3 replies] Last: Wouldn't this also work? if(mystr == ("good" || "well" || "okay" || ... (by TheBeardedQuack)
by Zadd
Hello Everyone, I am new to the forums! :D
 
Hello! My name is Zachery Johnson. I am 17 years old, turning 18 in a month or so. I've always been a creative person, always having interesting ideas. People s...
[6 replies] Last: I must agree with purchasing a good book, i personally recomend "Begin... (by TheBeardedQuack)
Strings are your friends.
 
I'm doing the strings are your friends exercise on this page. http://www.cplusplus.com/forum/articles/12974/ Is there a way to put a space between the user fir...
[5 replies] Last: I realized I didn't need '\n'; . Thanks for the help. Here is my cod... (by PETROS39)
Template issues
 
Hi all, I was wondering if someone could help me with one of the exercises I have for uni, The program itself works fine, however when I attempted to add...
[3 replies] Last: Aside: I see exception specifiers in the code above. These are prett... (by andywestken)
Bracketing Search
 
I'm doing the bracketing search exercise on http://www.cplusplus.com/forum/articles/12974/ I did the first star. I'm been trying to do the second star now for...
[9 replies] Last: Never mind, I figured it out. (by PETROS39)
Publish c++ code?
 
Hi, I just started writing c++, and this is probably a stupid question, but how do I make my c++ code into a program? I use code::blocks ( http://www.codeblocks...
[8 replies] Last: All the replies were really really helpful, thank you so much :) -Pet... (by ptrlake2)
Program that estimates pi using the squeeze theorem
 
Hello. I am a c++ programmer and I am in 8th grade. I have been programming for a month now. I just learned how to use the squeeze theorem to derive pi (sandwic...
[4 replies] Last: @Volatile Pulse: Thanks, I had already tried that. I just didn't know... (by MildewyTester)
writing the contents of a struct in binary mode
 
This is the second thread I've started regarding this topic in as many days, but I'm still stumped as how to get it to work. :( Given: There is a structure ...
[1 reply] : Just use string.c_str() to get the c-style string out of your std::str... (by BlackSheep)
Making a pattern using a nested loop?
 
Hi there. Could anyone give me a hand to figure out how to do this: I'm asked to make a "nested-loop" that produces the following pattern: 5 ...
[4 replies] Last: They used the same steps that I showed you. The first for statement do... (by Volatile Pulse)
Problem in source code
 
Hi all, I have a problem with my source code, but I can't find out what I did wrong. Here is the header file (Main.h): #include <iostream> #define CURRD...
[10 replies] Last: Ugh, I was under the impression voids couldn't even use returns, that'... (by Volatile Pulse)
by Hucaru
I/O help
 
Hi I have set myself a challenge to help me improve my understanding of the I/O streams and have got stuck on how to proceed. Here is the challenge I set myself...
[no replies]
Problem writing user inputs to text file
 
I am having a problem with a program I was asked to make for a class and unfortunately I was only able to turn in a portion of the program. I would still like t...
[6 replies] Last: The cin.ignore() worked fine for the intended purpose as the int cout ... (by crawler30)
Teaching
 
I'm making some books to teach basics- advanced in C++. But i am not sure how to cadagorize what is in what category. Can someone tell me how they would catagor...
[3 replies] Last: Thanks you people were of great help. (by joshrocks)
getch() Alternative?
 
I've been looking around because I know how getch() isn't standard and I wanted to get started on making everything in my code a little more standard. I read ht...
[11 replies] Last: Is curses now standard? I've been seeing it pop up a lot, but I don't ... (by Volatile Pulse)
by edda86
help - find address of element in 2D array
 
I've written a small program in native C++ that populates a 2D array with integers from the user. The program has to output the address of each element in the a...
[2 replies] Last: Lines 41-43 make no sense, granted the if statement should run EVERY t... (by Volatile Pulse)
Least Square Approximation with Lots of data of many digits
 
Dear all, I need to write a code for least square approximation with a straight line. The formula can be found here. - for a and b which are all that I need. ...
[1 reply] : Have you tried using a vector to hold each place value? Using a decima... (by Volatile Pulse)
Entire array as argument example
 
Hi cplusplus.com forum. Could someone help me build this code into anything simple so that it works please. #include <iostream> using namespace std; in...
[4 replies] Last: It is a wrong statement. Any function may be declared in another func... (by S G H)
June 2012 Pages: 1... 3536373839... 51
  Archived months: [may2012] [jul2012]

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