
please wait
by Abbynormal
New to C++, Code Does not Function as Expected
|
Hello, I have never posted to a forum before as I am completely new to the c++ world. I have been playing around with IF ELSE and DO WHILE statements. I wro... |
Jun 30, 2015 at 10:46pm
[5 replies] Last: Thank you! That did it! (by Abbynormal)
|
by Tarbal
pass string to double
|
I have a string containing "EoGUESS = 1e10" How can I pass 1e10 to double EoGUESS? |
Jun 30, 2015 at 10:42pm
[15 replies] Last: Wow, thanks Andy. I'm not sure I understand everything here, since I j... (by Tarbal)
|
by plh
Whole number to decimals
|
I am writing a c++ program to turn a number into coins. I got the program written and it works perfect if the input is in decimal form. i.e .87 for 87 cents. Ho... |
Jun 30, 2015 at 10:12pm
[2 replies] Last: YOu want just 87 for 87 cents? Just don't multiply input by 100. (by MiiNiPaa)
|
by entermax
Help with program C++
|
Hi guys, my teacher asked for a program to count all words that contain 3,4,5,6 letters in them . he asked to use nested sentinel-controled loops and filein.get... |
Jun 30, 2015 at 9:08pm
[4 replies] Last: Ok, that's a start. It's a little bit tricky reading strings from a f... (by kbw)
|
by alphamanda
Expected unqualified-id: Fuel usage program
|
The premise of this problem is to calculate the fuel used based on a user input fuel efficiency (in this case 45 mpg) and the miles driven (also input by user, ... |
Jun 30, 2015 at 8:45pm
[1 reply] : Line 10: Odometer is a class name. You can't set a class name to 0. Y... (by AbstractionAnon)
|
a program for products |
hey guys we were asked to do this project in my collage it's about the products of a market the problem i am facing in the code is that when i am filling t... |
Jun 30, 2015 at 7:53pm
[12 replies] Last: done thanks for your responses (by Mahmoud Mansour)
|
by ShonH
Syntax namepsace:class(method):a(method)
|
Could someone explain this syntax in a simple matter? Thanks in advance! I am only guessing that's a method in the parenthesis, and the 'a' I have no idea wh... |
Jun 30, 2015 at 6:41pm
[2 replies] Last: I was referring the 'a' to the one in the title. I should have kept th... (by ShonH)
|
by jhykima
Getline Question
|
How come the following code is not letting me enter the "player_one_name"? Also, is there a way to kind of dynamically set how many characters the getline funct... |
Jun 30, 2015 at 3:52pm
[6 replies] Last: the following code is also having a difficult time handling the getli... (by MiiNiPaa)
|
by zan nabil
Can do this char* x;x = "XXX"; but not this char x[n];x="XXX"; why?
|
if i do this :-> char *a = "XXX"; //valid char a = "ZZZ"; //valid as long as n>3 //char a = "ZZZ....." is valid too but if i do this , char *a; ... |
Jun 30, 2015 at 3:46pm
[4 replies] Last: and another thing is that, pointer to a char can be a string (an arra... (by Disch)
|
by JanoOr
Passing member function to member fct
|
Hey, I want to pass a non static member function to another member of the same class. Following basic example: //--------------------------------- //functioncl... |
Jun 30, 2015 at 3:31pm
[6 replies] Last: #include <iostream> struct A { template < typename PTR_MEM_FUN, ... (by JLBorges)
|
by obito94
save new file each time?
|
Lately I've been messing around with something at work and I can't figure out how to make a new filename each time the user completes the program. What I'm try... |
Jun 30, 2015 at 2:57pm
[2 replies] Last: I did it in C because I'm more used to it. I haven't been taught C++ ... (by obito94)
|
by jhykima
Question Regarding Map
|
Hello! I am new to map and the following code returns a "segmentation fault (core dumped) error message. I'm not sure why. Any suggestions on where I am going w... |
Jun 30, 2015 at 1:27pm
[1 reply] : It works fine if you create the iterator (or reassign it) after you in... (by shadowmouse)
|
function outputs to screen. I need output to array |
I asked a question earlier on here and got some code. This code works perfect for me except its outputs path,file to screen and I need the output in an array an... |
Jun 30, 2015 at 12:37pm
[2 replies] Last: Last night I was looking to rewrite this example to work for me. I cam... (by jsonlickliter)
|
by plususerz
My max function always goes to the last number
|
Why does my max function (meant to find the highest number within the array of 10 numbers) ALWAYS state the very last number in the array? #include <iostream... |
Jun 30, 2015 at 12:06pm
[2 replies] Last: @ne555 DAMN wow.... can't believe I wasted 30min to an hour on that. T... (by plususerz)
|
by zan nabil
Are iterators just pointers wrapped around some classes?
|
The output is same ..... string p = "Hola"; printf("%d\n",p.begin()); char *k; k = &p ; printf("%d",k); Then can i assume iterators are... |
Jun 30, 2015 at 12:04pm
[2 replies] Last: Iterators are designed to look and behave like pointers. Chances are... (by Duthomhas)
|
by zan nabil
Can print the values of iterators using printf() but not cout<<
|
string s ="nabil" ; cout<<s.begin()<<nln; //gives me error //but this prints some values printf("%d %d",s.begin(),s.end()); Didn't get why? ... |
Jun 30, 2015 at 11:02am
[1 reply] : Both are wrong. With cout you have the advantage the the compiler is a... (by coder777)
|
by jhykima
Suggestions on my address book using map
|
Hello! This is my first time using the map data structure. And I was wondering if you can suggest any improvements to my code? I know that what I wrote is not t... |
Jun 30, 2015 at 10:59am
[3 replies] Last: Line 51 is wrong. Line 68 doesn't make sense. Line 75: Before you assi... (by coder777)
|
by jood96
a help
|
Can someone help me with this: Problem: The Babylonian algorithm to compute the square root of a number n is as follows: 1. Make a guess at the answer (you c... |
Jun 30, 2015 at 9:28am
[4 replies] Last: It's not an assignment; i'm just taking some online lessons on C++ and... (by jood96)
|
by yolofishlord
problem with percentage
|
hey guys i have a problem with the percentage of my code, it is wrong, can you help me? Code: http://pastebin.com/z08HaTsp |
Jun 30, 2015 at 8:41am
[2 replies] Last: http://stackoverflow.com/questions/3602827/what-is-the-behavior-of-int... (by MiiNiPaa)
|
by JanoOr
Class inheritance and forward declaration problem
|
Hey guys. I'm new to object orientated programming and therefore have an inheritance issue I cannot resolve. The actual problem is, I want to have a class (Mo... |
Jun 30, 2015 at 7:27am
[5 replies] Last: Thanks, for your help. The error was resolved by not just forward dec... (by JanoOr)
|