Beginners - September 2016 (Page 12)

Functions and arrays
 
How would I write a function definition for zero_all, and write loops to do it also the function definition for zero_row. How do I make it print in an 2D ar...
[5 replies] Last: Let's use zero_all where it occurs in the code to make some sense of t... (by booradley60)
by Ronave
file i/o has no output
 
Hello fellow coders. I have a slight issue right now. My class is working with inputting and outputting information from files using the fstream header and such...
[1 reply] : Well, from a little bit of looking around, and reading a bit closer in... (by Ronave)
Stars Equation
 
Prompt the user to enter a positive integer and create a pattern of “stars”. I am having a hard time displaying and working the bottom half. The top should ...
[3 replies] Last: Hello salomonthesav, I played with the program until I came up with t... (by Handy Andy)
Pointer to pointer
 
I have a code #include <iostream> using namespace std; int arr ; int foo ; int bar ; int baz ; void initialize() { int i; for(i = 0; i < 20; ...
[4 replies] Last: Yeh I acctually learn from you too! Thank you! (by thinhphucvang)
Why am I getting the output CD?
 
Why am I getting the output CD when n = 10? #include <iostream> #include <string> using namespace std; int main () { int n; n = 10; if (n < 10...
[3 replies] Last: indentation does not change the meaning of your program, but it may he... (by ne555)
by Lado
array
 
I'm trying to read a file with unknown number of rows and 4 columns of string and int into a array. I'm not really sure how that would work... could someone gi...
[3 replies] Last: Why are you starting a new thread for this? You were given a solution... (by AbstractionAnon)
Help with Xcode error c++, comparison between pointer/integer
 
Hey guys, I know this code might be a mess and it's definitely not done, but i'm not asking for help with the entire thing. I just need to figure out why I keep...
[5 replies] Last: #include <iostream> #include <cctype> #include <cmath> using namespa... (by AbstractionAnon)
Integer division and remainder
 
My programs does its function when both numbers are positive but when one of them is negative it does not. Program objective: Write a program that reads an ...
[6 replies] Last: Got it to work myself #include <iostream> using namespace std; in... (by Oriol Serrabassa)
help me guys
 
im so confused why this one didnt work #include <conio.h> #include <iostream> using namespace std; class angka { public : int a; ...
[2 replies] Last: Hello gwpalingjago14, It hit me lat night just as the computer shut d... (by Handy Andy)
by kmce
total, sum program
 
I have basically just started learning c++ and I am trying to create a program that allows the user to enter numbers and everytime a total will be give, however...
[4 replies] Last: omg of course. foolish mistake. thanks for pointing it out (by kmce)
by Jmor
does not loop to default
 
I have a bit of an issue I cant figure out, my code seems fine until I try to get it to loop to default my code will not loop there any thoughts on what I am do...
[2 replies] Last: Andy you are a lifesaver I just didn't understand what was going on th... (by Jmor)
Problem with calling a func from a class
 
My task is to load an .owl file(which is already done), and print out the ontology in c++. The following is what I have done: 1. I used autordf::Factor...
[1 reply] : So what is your problem? (by SakurasouBusters)
Question about if/else statements
 
How do I make my second block execute under the first block? First Block if ((age >= 18 && creditScore >= 650 && income >= 20000) || (age >= 18 && creditS...
[8 replies] Last: if (homeowner == true) (by closed account 48T7M4Gy)
iterators incompatible?
 
Why? #include <iostream> using namespace std; #include <list> class B { public: B(int _x) { x = _x; } int Get() { return x; } priv...
[3 replies] Last: Thanks MrHutch. (by wennuan)
Dereferencing iterators
 
I have a list<int> LIST. list<int>::iterator listIter; for(listIter=LIST.begin();listIter!=LIST.end();listIter++) cout<< *listIter<<" "; That co...
[2 replies] Last: So a data structure contains our main data and also some auxiliary dat... (by ajith mk)
Printing Prime and Non-Prime Numbers
 
Hello! I am trying to write a script that will have the output as the following: 1 is not prime 2 is prime 3 is prime 4 is prime N is/ is not prime ...
[2 replies] Last: Here's some pseudocode that may help by the way. if( number is 1 ) ... (by mpark4656)
.
 
You seem to be giving little details over time. There is not enough information available so we can't help you.
[1 reply] : I'm trying to read my class file and print it out on my main function... (by jlb)
Text from an input file into a 2d Char Array
 
I'm confused how I'm supposed to get text from an input file and put it into a character array. My assignment is to use strtok() and get tokenize sentences into...
[2 replies] Last: I'm sending statistics to an output file that is support to track: the... (by FredDilb)
c++ IDE with included compiler , c++11 or higher support
 
Hello, I was struggling to update my netbeans compiler to support c++11 so uninstalled it. I'm hoping there is some user friendly IDE which includes the compi...
[5 replies] Last: When I'm doing tests with just C++ I use Geany and commmand/terminal. ... (by BHX)
Alternatives to nested switch-case?
 
I'm working with Irrlicht's GUI event handler and I found myself trapped in making nested switch-case statements. For example, the code show here is the outer n...
[no replies]
September 2016 Pages: 1... 1011121314... 34
  Archived months: [aug2016] [oct2016]

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