Beginners - September 2015 (Page 9)

Need More Help with Code Problem
 
Hi, I tried working on the code, but I don't know what to do next even after reading the chapter from the textbook. Could someone please help me out? I don't ...
[1 reply] : Your code seems to be fine. I see no errors. It compiles, it runs. I ... (by pearlyman)
pointer1 = pointer1 ->pointer2 syntax
 
Hi everyone, I need help on why following program brings an error message. Whenever arrow() is accessed by Object, it shows an error message EXC_BAD_ACCESS, an...
[1 reply] : A pointer is a variable that points to an address in memory. You can a... (by DyslexicChciken)
Assistance needed in my code.
 
Our instructor wants us to write own sqrt code. His instructions: Write your own square root function named double my_sqrt_1(double n) using the following pse...
[3 replies] Last: Let's fix that, at the start of the function create a variables upper... (by LendraDwi)
File input problem.
 
Everything seems to work when main() runs newFile() except for the fact that it only writes everything after the first word. So if I input: this is a test file....
[13 replies] Last: Ts about the length and delimiters, but if its work. Then its Great :... (by LendraDwi)
calculating averages with loops
 
Ok, so what I need to do is calculate the average distance of flights per day, as inputed by the user. My problem is that I have built the program, and instead ...
[2 replies] Last: Thanks That did it. I feel like an idiot. I swear it is always the sma... (by iskandar)
Xcode / Visual Studio question
 
Hello all. I'm currently taking Data Structures and it is my first experience with C++. We have an assignment due Monday and our instructor told us we can use w...
[1 reply] : Don't cross-post. One thread is enough. (by helios)
While Loop and Return New Value.
 
I am writing a lottery machine for a class. I am having trouble figuring out how to return the new value I receive. If I get an even number I subtract that from...
[1 reply] : Never mind I figured it out. When I went through the program I got th... (by Kiallendor)
programming class
 
I'm having an error in my C++ class. I can't seem to get the division to work properly. I keep getting strange errors. else if (oper == '/' || oper == '%') ...
[5 replies] Last: it works FINAL RESULT #include <iostream> // input and output #... (by CrypticA1)
"Expected primary-expression before" with for loop.
 
The issue is in the for loop with "class." Anywhere there is class. At first I assumed I just needed to declare class as an int instead of within the loop, but...
[1 reply] : class is a reserved word in C++. Use some other variable name. Not... (by AbstractionAnon)
Return Value and Location of function
 
Hi, I have short questions about part of codes in the program below. (Line number 103) Q1. What does the syntax mean? (Line numbers 171 to 174) Q2. What is t...
[2 replies] Last: And please, do not double post. It clutters forums and spreads attempt... (by MiiNiPaa)
by GFring
returning 2 values by passing pointers to function
 
I'm trying to pass pointers to a function so I can get 2 values. I get garbage in the output #include <iostream> #define PI 3.14159 using namespace std; ...
[6 replies] Last: You're welcome. Pointers can be one of the more difficult parts of C/... (by closed account E0p9LyTq)
by Winsu
I'm getting a strange warning
 
on cout test I'm getting a warning which says, the addres of test() will always evaluate as a true and it prints 1 forgetting the format of a complex...I know t...
[4 replies] Last: I dont know but I think that I have always declared a n object without... (by Winsu)
Draw a line in MS VC++
 
Hi guys, I am beginner in MS VC++. I have a 2D array (10 rows and 4 columns) like : x1 y1 x2 y2 ------------ 1 1 3 4 2 3 2 5 . . . . . ...
[3 replies] Last: There is Windows' GDI LineTo function: https://msdn.microsoft.com/e... (by closed account E0p9LyTq)
need help with conditional statements
 
im kinda new with these to cut to the chase basically im making a game, interactive fiction to be exact. for example: char choice ; if (choice == "STAR...
[4 replies] Last: #include <iostream> #include <string> #include <thread> #include <chr... (by JLBorges)
Please help me!!!
 
Hi i just started programming in c++ and im a little confused as to why my program isn't running efficiently. The object of this assignment is the prompt the us...
[3 replies] Last: Thank you so much MiiNiPaa, your insight by using the || was great and... (by cpluswut)
Calling a switch statement from a do-while loop.
 
I am not sure exactly where the problem is in this. I am creating a program to display the ascii key code and the morse code for any alphabetic character press...
[2 replies] Last: Ok, Thank you. I will confess that the first 8 weeks of this class we... (by Ruthgar)
Using the if statement with inputs
 
I am receiving an error code saying that y, Y, n, and N are undefined. Although I know they are undefined I just want to use the user input for my if statemen...
[4 replies] Last: Thanks for the help, got the y's and n's to work. Cant get the error m... (by ImaVampire)
by Aideux
Variance help?
 
Hey all! I'm trying to write a program that will give me the variance of a set of numbers in an array. The variance is part of a larger program, so I'll just gi...
[2 replies] Last: I was only asked to calculate variance, so I just went with the easies... (by Aideux)
Having trouble with array sizw
 
Sorry for the second thread, but for some reason, when this program runs, it doesn't give the expected output. In theory, by using the size function, the o...
[no replies]
int to string conversion issues
 
I seem to be making mistakes with how conversions from int into strings and then evaluating the string characters and then pushing certain results into a vector...
[3 replies] Last: I was a little confused, after some tinkering I realized that all I ne... (by zacklucky)
September 2015 Pages: 1... 7891011... 42
  Archived months: [aug2015] [oct2015]

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