Beginners - August 2014 (Page 6)

by jksdk4
Structs, arrays, omitting vectors
 
Hi. I'm doing an assignment in C++ that mainly deals with structs and arrays. They are not my strong point right now. I constructed this code below with a frien...
[5 replies] Last: Yeah, before you noted the typos I had that function named printNumber... (by Lowest0ne)
What should I do next?
 
Hi, guys. I have been studying C++ by myself for a while and finished reading C++ Primer by Stanley Lippman, so I know some of the basics in C++ programming, su...
[6 replies] Last: To Computergeek01: I guess you misunderstood me. What I meant is that ... (by glenjoker)
Can't convert 3 doubles from a string using stod()
 
I've found the following code as reference of stod() function. Here 2 doubles are converted from a string using the following code. double earth = stod (orbit...
[3 replies] Last: stod() function returns the first double number contained in str , ... (by fanliver)
[Help rvalue]
 
Somebody help me!!! using namespace std; class Test { public: Test(){ cout<<"Default constructor"<<endl; } Test(const Test& t) { cout<<"Co...
[5 replies] Last: The effect of line (1) is what LB said. Thank you! :) (by fanliver)
Help me in getline function..
 
When using vc++ console i got the wrong output. But in Visual studio i got the right output. Here is my code #include <iostream> #include <string> using nam...
[4 replies] Last: Enter your address:Philippines Philippines//needs 2 enter Enter you... (by CodeSlayer)
Simple Dice Program
 
This program was designed as a simple tool, for my brother, to replace the need of physical dice for D&D. As, I would like to think, an intermediate level progr...
[4 replies] Last: I was thinking more along the lines of "it's often the smaller, simple... (by NeckDeepInSyntaxErrors)
HELP!
 
I am rebuilding a very old program. This part is in one of the custom headers. The compiler gives error on line 5: Cannot overload functions distinguished by re...
[1 reply] : This means there is some other function called round, taking a float p... (by Aceix)
How to assing string value?
 
I created my own list (template) and I want to assing string value, but I got error in file "SuperList.h" line 24. Why is that? main.cpp http://pastebin.co...
[3 replies] Last: In the constructor you forgot to initialize capacity and in the add... (by Peter87)
Beginner c++ math question
 
I'm doing a practice question in which I have the answer to(below), but I'm having a hard time understanding how to solve the question. Can someone explain how ...
[4 replies] Last: Okay, so I need the sum. MY answer for the code above is .64, is that ... (by hellworld136)
Fractions
 
Well I pretty much have the code 100% complete except that our submission program, Athene, keeps saying something that my CMD does not. I have to perform additi...
[1 reply] : Nevermind I got it. I thought the negative swapped in the reduction fu... (by RobGillespie)
passing arguments by address
 
Consider the following program. The function modifies the value of the variable "iNumber" and prints 6, but when I remove asterisk in the assignment (when I wri...
[1 reply] : The asterisk on line 5 is the dereference operator. http://www.cpluspl... (by giblit)
Insertion sort
 
I was working on the last question of a basic program and I'm having trouble implementing an insertion sort for the following task: ★★★★ Modify the p...
[no replies]
delete operator
 
I have a question regarding delete operator. In case there are 3 instances each holding the next/previous instance how to delete it? class A : public Parent ...
[4 replies] Last: I like RAII approach, i.e. some wrappers around naked pointers, I mean... (by BenCPlusPlus)
I have looked around, problem with range
 
Problems with using a set range for an input I want the input to only allow 0.05 to 0.20 0.05 =< pg <=0.20 do{ cout << "percent of gold (0.05 to 0.20):" ; ...
[4 replies] Last: Thanks a lot guys so I will try using a different data type such as in... (by djninjanz)
Coud any one give me a hand?
 
How to read file in array if you know the number of rows but you dont know the number of columns? Thank you!
[8 replies] Last: Like I said earlier you could either read in each row twice first time... (by giblit)
Differences between Cout and Printf
 
Im actually programming in c++ so I wrote those lines with the same message and I knew that the program gets the same thing.
[1 reply] : printf comes from C and doesn't handle C++ types. cout is C++ and ... (by Peter87)
setscrollpos
 
I am confused completely, How can I fix this? Background: I am trying to rewrite really old but useful program. SetScrollPos(wi.hscrl,SB_CTL,wi.scrlpos...
[2 replies] Last: I saw that, but what is wi.hscrl in my case? Thanks (by SteveOshnall)
by lekha
how is it calculeting..??
 
Greetings everyone... i would like to know how c++ is calculating this equations manually...?? if i put this codes in c++ compiler i got those answers.. bu...
[5 replies] Last: [quote=keskiverto]Peter87 wrote "Right-to-left", probably as typo, for... (by Peter87)
by klay2
need help with if statements
 
I think the problem is that I'm comparing strings in the if statements #include <iostream> #include <string> using namespace std; int main() { ...
[4 replies] Last: You can use && instead of two if statements. Also, once you find ... (by dhayden)
Any one?
 
If you have a numbers in columns and rows, and you know just the number of rows it is 4, so how you need to find out every single column and write those numbers...
[11 replies] Last: Thank you! sorted (by Dovydas Milius)
August 2014 Pages: 1... 45678... 40
  Archived months: [jul2014] [sep2014]

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