Beginners - October 2015 (Page 40)

++pointer works, pointer++ doesn't (C)
 
I'm counting the number of s's added to the ends of words. If a number is 1, I don't add an s, otherwise I do add one. This is C code (not C++; I have to use C ...
[1 reply] : The order of operations is completely different. In one form, you incr... (by LB)
For Loop Execution Steps
 
Hello everyone, I am a C++ beginner and this is not a homework question but more for my general understanding. I understand how pre-increment works and how pos...
[3 replies] Last: Happy to help. Goodluck :) (by TarikNeaj)
by Andym
why is my array "out of scope"
 
I am getting the error that my array was not declared in this scope. Why does it do this and how can I be sure of where the declaration goes? Header vo...
[14 replies] Last: Sorry. I was thinking that find_account_by_name was a member of the c... (by AbstractionAnon)
Need some help for class
 
Hi, i am trying to do my homework, here is the question. 1.Write a program using classes that will add and subtract polynomials. 2. create a menu will allow t...
[1 reply] : I have no idea why I can't put any value in the selection. I don't k... (by AbstractionAnon)
Segmentation Error, Etc...
 
Can someone explain why I get a segmentation error in this code? I am a newbie, student, and just trying to get my work done. Also, I need to pass the values (...
[5 replies] Last: You're still making an out of bounds reference. You missed my earlie... (by AbstractionAnon)
Error: Expression preceding parantheses
 
Hello. I am writing functions for determining wind chill. Everything has been working, but on the section below, I am getting red lines under the parens and...
[1 reply] : pow is a function, not an operator: std::pow(windsp, 0.16) ... (by LB)
by Marth
For Loop, Array Question
 
What exactly is going on with this for loop? is this determining the amount of indices in the array? and is it putting zero (0) into each index? // lets ...
[3 replies] Last: thanks for the help! (by Marth)
file read/write issues.
 
I am writing a code for a game, and I want the game to store a win/loss record in a text file... but it isn't working the way I want it to. It pulls the same r...
[3 replies] Last: I caught that mistake, changed it. Still wont work. (by CaptainBierstein)
by Marth
Help understanding snippet
 
Prof give sample code, but do not understand what's going on up in here: Entire code at bottom; questions in the comments within code int letterc...
[2 replies] Last: Thanks, very helpful. (by Marth)
by aqum
I have a new question on how to make the program start from the beginning
 
This is what I have so far. So basically I need Fine to display whatever number as long as it's below 5 and if it's 5 or greater than 5 it has to display 5. Tha...
[8 replies] Last: [quote=pearlyman] Without a rewrite of your code (Strongly suggested) ... (by AbstractionAnon)
int main()?
 
As we know #include <iostream> using namespace std; int main() { cout << "Hello world\n"; return 0; } Question is what is the meaning &...
[2 replies] Last: http://www.cplusplus.com/doc/tutorial/program_structure/ (by LB)
2D array to 1D array
 
Is it possible to assign the elements of a 2D array to a 1D array? I'm making a card game where I HAVE TO use a 2D array to create the deck and while dealing th...
[1 reply] : Don't mark your topic as solved unless it actually is solved. Just pr... (by LB)
Accessing Sub Strings
 
If I have an array of type string, and each of its element is made up of multiple sub strings as well (e.g. I have an array of a deck of cards and its individua...
[1 reply] : Sure. Use string::find_first_of() to locate the space between words. ... (by AbstractionAnon)
need help understanding
 
have some trouble understanding this bit of this code #include<iostream> using namespace std ; int main() { int m, t ; ...
[2 replies] Last: t*= 2 ; Doesn't do anything. Huh? t*= 2 ; is a perfectly accep... (by AbstractionAnon)
What is <iostream>?
 
Can you please explain me what is meant by #include <iostream> using namespace std; int main () Please explain me line by line. Thanks in advance.
[5 replies] Last: Thanks all (by ZahoorKhan)
trying to create a fraction
 
error no matching function for call to 'Fraction::Output()' not sure if im using constructors the correct way or default constructors the correct way as far as ...
[1 reply] : Your declaration for Output says it takes two doubles. void Output(d... (by AbstractionAnon)
Plink issues!!
 
Hello friends, I have written some code for the game plinko. All of it works as expected and as required EXCEPT! there is an option to put multiple chips into ...
[no replies]
by HG319
Hash Tables
 
I having trouble with some hashing. We are given the hash class and within the class we need to figure out total number of elements in the table , the size of ...
[no replies]
Difference between vector<Name_of_class *name_of_variable> and vector<Name_of_class name_of_variable>
 
Hello there! :D I think the title says it all, so does anyone who knows be willing to help me?
[2 replies] Last: I found this that explains it a little more... You can create the ob... (by pearlyman)
First Program printing problem
 
Hello, I wrote my first program, and although the first printing is ok the second one is something like "!!"and letters after that, and I have no idea why....
[1 reply] : Where to begin?? int i,s=0,flag=0,n=1,right=0; // Seriously? in... (by pearlyman)
October 2015 Pages: 1... 3839404142... 57
  Archived months: [sep2015] [nov2015]

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