Beginners - January 2019 (Page 2)

Numerical Approximation
 
Hi, I have to code two numerical approximations and compare them by giving them two different values of h, namely h1 and h2. I have already written the code,...
[4 replies] Last: Of course it runs for ever. You NEVER CHANGE THE VALUE OF i. Just use... (by lastchance)
by Tduck
Segfault upon compilation
 
My last question was far too wordy and I tried using an entire program to describe my problem. I have since made my issue into 40 lines, namely because I fixed...
[7 replies] Last: Oh. Right, arrays start at 0. I guess that kind of flew to the back ... (by Tduck)
Address boundary error, while reading a file
 
hi every I received a bug when I reading a file. I want to read a file, which more than (1 << 17) lines. The file is somehow like that : 1|2|3|4|.... 1|2|3|4|.....
[11 replies] Last: What I do now, is only having one vector, resize or reserve at... (by CakeByTheOcean)
Fraction Class
 
I need some guidance and constructive feedback on how to get my code to execute adding, subtraction, multiplication, division. I have created overloaded functio...
[7 replies] Last: @Granado Wow that was wonderful. Thank you for sticking around to help... (by lizan0a)
Wrong binary expression with double
 
Hi :) I am trying to implement a numerical approximation, but first I need to define the function and its first derivative. This is my code for the first der...
[2 replies] Last: double y=-(50*x)/(((25*x*x)+1)^2); ______________________________^ ... (by AbstractionAnon)
Best way to retrieve multiple variables from nested objects for other object?
 
I want to reach into an object, which is nested in other objects, and retrieve data to easily pass to another object. Please see the code below for a brief outl...
[12 replies] Last: Interesting. I'll practice with some examples from that link and see i... (by closed account Ezyq4iN6)
by Bopaki
Help me display the total volumes of Box1 & Box3
 
Line 87 and 88 calculates the sum of two volumes Box1 + Box2. This is what I get when I try to display their sum: Volume of Box1 : 210 Volume of Box2 : 1560 ...
[2 replies] Last: Hello Bopaki, You have been around long enough to know not to use the... (by Handy Andy)
by Bopaki
I do not know how to work with:String::String(char const*)
 
I get this error when compiling my program: undefined reference to `String::String(char const*) #include<cstring> #include<iostream> #include<casser...
[8 replies] Last: Your constructors look fine. You have some other problems though. Li... (by AbstractionAnon)
Homework help
 
// delete
[1 reply] : And? What's your question? What, exactly, do you need help with? (by MikeyBoy)
by Bopaki
How can I display the sum of object1 and object2
 
I get this output when I try to add two objects: Volume of Box1 : 210 Volume of Box2 : 1560 Volume of Box3 : 10395 The sum of Box1 & Box2 = 0 Process r...
[4 replies] Last: Okay thank you everybody. You are both correct. The answer of 5400 is ... (by Bopaki)
diodecalculations
 
I am new to C++ and have this program that needs to solve the equation print the results all in a nice way to read it. I got it running but I am not able to mak...
[5 replies] Last: @denwisi, I don't think you understand the problem - and you need to d... (by lastchance)
Pythagoras Theorem program
 
Two cars A and B leave an intersection at the same time. Car A travels west at an average speed of x miles per hour and car B travels south at an average speed...
[2 replies] Last: As keskiverto mentioned: You calculate the formula before the variab... (by coder777)
Image Bitmap not showing
 
So, I was experimenting with Windows Applications, but when I try to diaplay an image the program compiles but the image does't show up. The file "logo.bmp" is...
[4 replies] Last: I think the problem is in the path to the file What makes you think s... (by coder777)
by bzarr
Only the first two cins are processing and then the program stops.
 
ofstream outFile; string student1, student2, student3; int id1, id2, id3; outFile.open("names.txt"); cout<<"Please provide your first, and last na...
[1 reply] : cin and getline don't play nice sometimes. I would just use getline f... (by jonnin)
Replacing a substring with a string
 
I need to replace a substring with a string. This is what it says to do:Command line tool: You are to develop a program that will change all occurances of on...
[7 replies] Last: SEP field. Im outta here! If you use it, do make sure you understand... (by jonnin)
If else problems or something else i'm lost
 
I posted about this last night however a new problem has happened. I want the code to be able to understand when i enter a lower case letter that it goes in the...
[4 replies] Last: it is just cout. your program has "using namespace std". If you don'... (by jonnin)
Moving an ASCII character left or right on the console when a or d are pressed
 
I have been trying to find a solution but nothing works. My code is very simple. Using getch() in a loop, when 'a' is pressed move "*****" left. When d is press...
[5 replies] Last: sleep and Sleep are different as well, or were ... (by jonnin)
by Tduck
Ncurses output glitches and becomes invisible
 
A general question about NCURSES: How do you keep the screen properly updated? My game requires precise timing and if the player cannot see what they ne...
[no replies]
by e4777
Population Growth C++ program
 
I got the hardest school assignment out of the whole class and we have started 2 weeks ago only. I need your guys help to make it out alive. I have some knowled...
[15 replies] Last: Try what? (by Grime)
Plotting math functions (quadratic functions) in C++11 on Ubuntu using ImGui
 
I'm trying to plot a math function (specifically a quadratic function) using ImGUI, and was wondering where I should start from? I'm trying to achieve somethin...
[15 replies] Last: Bingo! I think there are much better GUIs for use with C++ if you are... (by lastchance)
January 2019 Pages: 1234... 17
  Archived months: [dec2018] [feb2019]

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