Beginners - April 2015 (Page 16)

Help me with 2d Char array please?
 
What I want to do is know if I am couting this right. I want a random char (i just have 1 because it is easy to see) and have it move around. Would I set up a r...
[no replies]
Matrices
 
Write your question here. Please i have a submission of a c++ code that add , subtract, multiply, inverse, power , determinant ,divide matrices taking a strin...
[6 replies] Last: That really helped me thanks alot . (by Hossam Hassan)
Need a little help with if statement please.
 
Could some one give me a little advice on what is wrong with my program so far? I understand there are probably a lot of ways to simplify this code but I'm wond...
[1 reply] : Also...it keeps saying "i" is not being initialized. (by mgjohns61585)
Arrays and Input/Output
 
Hey everyone! So I've mostly figured out this program and everything compiles that I have so far but there are two parts that I am unable to figure out which is...
[no replies]
Help me i Try to do but i cannot.
 
This program is to be written to accomplish same objectives, as did the program. Except this time we modularize our program by writing functions, instead of wr...
[1 reply] : I believe the issue could be that you are opening the same file for bo... (by Tom56785)
What's wrong with this code: inputting from a file into an array
 
Hi everyone! So I need to write a code that takes an input file(I've included what the input file looks like below) and then sorts each different component into...
[1 reply] : Think about line 13 of your code and the 2 following lines after it. A... (by Tom56785)
Stack around np
 
Im creating a program to solve a number pyramid, it reads in these numbers, it then Stores them in an array then displays the array except the -1's, in the sha...
[4 replies] Last: That didnt fix it, some where in this code: //solver in the while loo... (by confusedengstudent)
Data files
 
Write a program that counts how many values are in a file. I have a text file called "data5c.txt" which is basically contains a unknown number of random numbe...
[8 replies] Last: No problem, I probably didn't phrase my question right. I've fixed the... (by gilgamesh45)
Default constructor for a stack
 
I am currently working on a project for class that requires us to implement a stack for integer use as a calculator. I am having problems with my default constr...
[1 reply] : this->capacity=capacity; What do you think this line is doing? Shoul... (by MiiNiPaa)
Please help me to fix the errors.
 
Please help me to correct the logic and errors. #include<iostream> using namespace std; class Class1 { public: int val; int ...
[2 replies] Last: Line 54 should be an error. Since total is not a static const memb... (by fg109)
How do I save an array of objects into a file and read the saved data from the file?
 
I've written the following program. Now how do I save the object data saved into array to a file? and also read the saved data from the file? #include <io...
[1 reply] : Probably the easiest way would be to overload the extraction and inser... (by jlb)
by relgin
How to define a class?
 
problem description: Write a program that defines a class called Rocket that represents a rocket. The class should contain the rocket's mass (in grams), the ...
[3 replies] Last: you're welcome. (by Jaybob66)
Function overloading question
 
Random snip-it from http://www.tutorialspoint.com/cplusplus/cpp_overloading.htm: "You can have multiple definitions for the same function name in the same scop...
[2 replies] Last: Overloaded functions must have different types and/or numbers of para... (by dhayden)
Help with encryption? Might have something to do with for loop?
 
So, if you type in hello, for example, it should output 114 140 58 58 144 If you type in one letter at a time, it works perfectly. However, if you type...
[2 replies] Last: windows.h should be the first header file. You don't reset c after ea... (by kbw)
read next line
 
Hi OK, i have txt file with this details FILE: Orange red blue now i know how can i get all line with EOF() in while loop. my question is how can get line on...
[1 reply] : Hi raminlich there are so many ways to do that. and i wrote an easy ... (by hankstr100)
class within template class problem
 
Hi, i have an exercise to implement my own list class based on previously created Link class so that in this list class would be iterators and begin() a...
[8 replies] Last: Thank you very much for your effort. Really appreciate! :) (by etrusks)
Counting the number of guesses?
 
Hi! I took it upon myself to work on the most generic and cliche cpp beginner's program. And i can't figure out how to tell the computer to count the amount gue...
[1 reply] : use proper indentation http://en.wikipedia.org/wiki/Indent_style in l... (by anup30)
can someone check this? nightmare with functions
 
this is the error: build/Debug/Cygwin_4.x-Windows/main.o:main.cpp:(.rdata$.refptr.gameIsNotOver[.refptr.gameIsNotOver]+0x0): undefined reference to `gameIsNo...
[3 replies] Last: I'll define those variables and would putting the call to playerWins(... (by firedraco)
Why can't I input anything?
 
Whenever I run the program a number is automatically input and i just get this, 1 What is your name? 2 Hello � ! Code #include <iostream> using namespace...
[5 replies] Last: Can you explain why though? Is there a specific benefit of string over... (by Arslan7041)
strcmp not working
 
To be exact: error: no matching function for call to 'strcmp' #include <iostream> #include <cstring> using namespace std; int main(){ int nelts = ...
[2 replies] Last: Line 13 won't work even if it compiles. strcmp requires two null-termi... (by dhayden)
April 2015 Pages: 1... 1415161718... 52
  Archived months: [mar2015] [may2015]

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