Beginners - October 2013 (Page 24)

by ivan1
2d array call in a function
 
Hi all, I have a 2d array that I declared as: int array ={{1,2,3},{1,3,5},{3,2,5}}; int InitialArray = {..}; int Result; I also use this in a function...
[1 reply] : The code you've posted shouldn't result in that error. Although, it s... (by cire)
If statement in while Loop
 
The code runs without an error, but the outfile shows that it isn't properly incrementing the values for temp_fail, press_fail, and dwell_fail, I can't seem to ...
[2 replies] Last: Now I just feel silly :( Thank you, Dev-C++ doesn't show all that. (by DroskiDro)
Passing a struct as a function argument
 
I am trying to pass a structure as an argument to a function that saves the data in the struct to a file. For some reason the data existing in the struct gets r...
[1 reply] : I never thought of performance when it comes to passing arguments my t... (by mobotus)
Clueless as to why this doesn't work. While/number storage
 
This is supposed to be as the first comment says but it does nothing for some reason. It's a big jumble of ifs but don't judge me for it. I'm working out of a b...
[3 replies] Last: Thanks for the clarification. It just seemed that you could simplify a... (by Chervil)
Not sure where to go from here.
 
My assignment: "Write a C++ program that computes student grades for an assignment as a percentage given the student's score and total points. The final score s...
[no replies]
Restricting inputs to numbers?
 
I've written this program that estimates federal taxes, it requires two inputs, one which specifies how the user is filing, and the second is their total taxabl...
[3 replies] Last: This might help you http://www.cplusplus.com/forum/beginner/18258/ (by mobotus)
Need help writing this program, Please help!
 
Hey guys, I'm new to programming and i need help figuring out this program. If any one can help me write this program would be great. Can some show me what t...
[6 replies] Last: Here is my 15 values program... #include <iostream> #include <iomanip>... (by spaceman13)
HELP!
 
I am being asked to use something other than all of those if/else statements. Any suggestions? I kind of stuck there. Also, I'm being asked to not initialized t...
[2 replies] Last: Thank you! That should def work! Any suggestions as to why the array i... (by Bianelis Liriano)
Lab Assignment Help Needed.
 
Write your question here. I put together this program for a lab in class. The task is to generate a array of random characters of a size determined by the us...
[1 reply] : When you pass an array to a function, you do not include the brackets.... (by Ispil)
My program crashes upon running it.
 
#include <iostream> #include <string> using namespace std; int main() { int n=2; string A ; n++; cin>>A[n-1]; } This is a basic code, not the whol...
[3 replies] Last: Oh my god, I can't believe that I missed that, thx a lot guys, really ... (by Alexander Dimitrov)
compiler crashes when looking for palindromes
 
This code looks for numbers that are palindromes in both decimal and binary. Function isDecPal checks if number is decimal palindrome and returns true if it i...
[2 replies] Last: On line 35 you define an empty string. On line 41 you try to access n... (by cire)
template problem
 
Here is my code and and I'm having problem on main.cpp on line cout << amarmatha.sub<int>(55,5)<<endl; caculator.h #ifndef CACULATOR_H #define CACUL...
[2 replies] Last: http://www.cplusplus.com/forum/articles/40071/#msg216270 http://www.cp... (by ne555)
Weather Code help
 
Could someone help me solve this. Not sure why it wont keeps freaking out on me. I think my compiler is broken or I am totally missing something #incl...
[3 replies] Last: Hmm... did you drop this file into a Visual Studio project that has ot... (by booradley60)
Char function
 
Hello i have a question. It is possoble in c++ to return a char variable? for example char Check(S, n, a){ char OK; for(int i=0; i<n; i++){ if(something == a...
[7 replies] Last: What kind of limit do you want 'max' and 'max2' to designate? (by Computergeek01)
#define, #undef usage
 
if i do something like: #define a 1 #define b 2 #define c 3 do i have to do an #undef for them at the end of the file? or will defining a c...
[1 reply] : It is my understanding that #undef is used if you want to give another... (by mobotus)
Converter using Classes (Object Error)
 
Hi guys im making a converter of temps with classes and im not getting it right. any idea? #include <iostream> using namespace std; class temps{ p...
[1 reply] : Well for start your function that starts in line 10 says it returns a ... (by mobotus)
printf to cout help
 
Hey everyone, I'm writing a piglatin conversion program that works...however my teacher wants the basic cout instead of printf. I wrote my code using printf be...
[3 replies] Last: nevermind, I was able to figure it out, I just replaced printf("%s%... (by MrBrewski99)
Will this work? VERY VERY SIMPLE CODE :/
 
I Keep trying to compile this with Dev C++ (with mingw installed) and it won't compile :( and when I try to boot from Command Prompt it opens Dev C++ or just do...
[4 replies] Last: As Mats said None of the stuff in main makes any real sense... ... (by Chriscpp)
Reading Value from user input.
 
Hello All, I am trying to write my first C++ program which is to be a simple 2 number calculator. The code works fine until I get to entering the numbers, Eithe...
[2 replies] Last: Thanks, Sorted it! (by george1448)
by kocik
Help with the code
 
i am having a little bit of trouble with a very basic code. It displays the menu, does the command but after the output I want it to redisplay the main menu (so...
[1 reply] : You just wrap a do...while around everything. string quit = ""; do ... (by Mats)
October 2013 Pages: 1... 2223242526... 86
  Archived months: [sep2013] [nov2013]

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