Beginners - October 2018 (Page 15)

Storing text file in 2D array
 
I want to store a text file in 2D array. I stored it in a 1D array but don't know how to do so in a 2D array. following is the data set. T N E M E C N U ...
[7 replies] Last: [quote=Naveed Khan]but your program is not ending....I guess it has st... (by lastchance)
Have my formula, but I don't know how to code it.
 
Hi, I am working on some logic puzzles. I need to apply this formula, starting at zero and moving up to whatever number is entered. (+ .5) * 2 So, if the ...
[14 replies] Last: Names of variables can be informative: int main() { int Cases {}; ... (by keskiverto)
Need help with my linked list program
 
Please note I am not trying to have someone do my homework for me. I just am struggling with this program and need help with the functions. I already read the f...
[1 reply] : You should enable all warnings in your compiler settings. main.cpp(88)... (by Thomas1965)
Reading An External Text File
 
Hi guys. I'm having a really hard time reading a text file. My teacher gave us an assignment and the code I wrote below should use the text file she gave us to ...
[1 reply] : Whether there are errors depends on what you want to achieve. Note th... (by coder777)
I need help with my homework plz Help
 
First of all hello everyone Im a first year Computer Engineer.Because of my English pres Exam I started university 3 weeks late and I missed a lot of things. Th...
[2 replies] Last: Thank you so much (by engineergirl99)
explain fragment of code
 
can someone explain the ouput of these 2 portions of code to me, i got it wrong an a quiz but didnt know how to answer it... #include<stdio.h> main(){ uns...
[1 reply] : &&, and logical operator, it returns true if both operands are true... (by ne555)
by Drac0
Programming assignment To find Derivative
 
I have an assignment for one of my classes that requires me to find the derivative using the limit definition of a derivative. I set up a while loop to try to f...
[4 replies] Last: Awesome, I knew that something stupid like that was the problem. got i... (by Drac0)
alphabetize program
 
How do I write a program where the user can input strings, and the program will alphabetize it? Like say the program asked for the first string, and the user i...
[1 reply] : Hello staamatis, If you used a while or for loop for input you would ... (by Handy Andy)
Test Average
 
Can someone explain to me why my array size doesn't let me run the program #include <iostream> #include <string> using namespace std; int main() ...
[2 replies] Last: Hello ddaniel10, You should compile the program before you post the c... (by Handy Andy)
Factorials Classes
 
Hey uh so I have a program to create and i don't understand the problems with this code. One of them is "expected ';' before 'for'" and i don't understand sinc...
[8 replies] Last: Yes thanks you I get I it You have been real helpful and i understand... (by Brandon17)
by oterus
possible continuation? pls help
 
read 2 numbers (ex: 4 7) increment 2 and decrement 1 so it will be like these: 4 6 5 7 6 8 7. (4 plus 2 = 6 -1 = 5...) im stuck at this point, i end up getting ...
[2 replies] Last: thanks! (by oterus)
by Satan
Example how of bitwise operators can be useful?
 
They can be performed on int and char types.. but in what scenario would we use them?
[12 replies] Last: Is this a real world example? or just an example? if so what library ... (by mbozzi)
What does && do?
 
What does && do in this x = 10, y = 15, and z = 20. (x != 5) && (y != z)
[2 replies] Last: An example... #include <iostream> using namespace std; int main() {... (by Manga)
Class Question
 
Hello Community! First of all sorry for this nondescript title. My question is about the following: #ifndef TEST_H_ #define TEST_H_ #incl...
[7 replies] Last: First of all thank you, TheBeardedQuack, keskiverto, and lastchance (f... (by Misenna)
by TCK
User-defined functions
 
How can I calculate area of triangle using 3 user-defined functions which include: (i) input() (ii) calculateArea() (iii) printArea() I'm still 1 month old i...
[17 replies] Last: Hello TCK, Good job. Now you have learned something. I do have one s... (by Handy Andy)
NEED HELP
 
There are N contestants (numbered 1 through N) who want to participate in Snackdown; let's denote the skill level of the i-th contestant by Si. These people wan...
[3 replies] Last: @hithere123 can u give me some logic or hint to solve this ? (by cool123dude)
Please help with palindrome code.
 
Please help, i am suppose to Create a class called Palindrome. This class will have a single function called isPalidrome which will accept a SINGLE seven-digit...
[2 replies] Last: Duplicate of: http://www.cplusplus.com/forum/general/244248/ Please ... (by MikeyBoy)
default constructor
 
my default constructor is giving me problems. #include <iostream> #include <string> using namespace std; class Course { private: string I...
[2 replies] Last: i re did this , thank you public: Course() { ID= "C... (by poohbear)
if/else statement: getting an error message I don't understand
 
I'm supposed to write a code that asks a user to input two primary colors (red, blue or yellow) and then tell the user what new color those two primary colors m...
[4 replies] Last: #include <iostream> #include <string> #include <map> using namespace ... (by lastchance)
by flarux
constructor called for no reason
 
hi I'm writing an array list class and whenever I'm adding something, my attributes are reset to zero and my constructor is called multiple times. #if !def...
[4 replies] Last: You're welcome. (by MikeyBoy)
October 2018 Pages: 1... 1314151617... 28
  Archived months: [sep2018] [nov2018]

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