Beginners - October 2013 (Page 56)

Converting Binary to Decimal with functions
 
Hello all, I am very new to C++ and I have a project due tomorrow in my C++ class and I'm rather stuck. I have to convert a binary value from an input file (...
[6 replies] Last: Here is some code: #include <iostream> #include <iomanip> #include ... (by ShodanHo)
Tax
 
Hey, all! I'm having a minor issue with my code so far for this program I am working on. It is a program to calculate the income tax based on marital status and...
[19 replies] Last: That's not how switches are used. That is how if if if if if if is us... (by giblit)
MS Visual C++ vs. Mac Xcode
 
As a few of you already know, I have started teaching myself c++ with a book called "Beginning C++ Through Game Programming." I've been using MS Visual C++ Exp...
[7 replies] Last: http://www.cplusplus.com/articles/jTbCpfjN/ ^ This will help you get s... (by agt)
Reading Binary File
 
Ok, So i'm trying to read a file and I think its in Binary and I have to add 65 to each character. Am I on the write track, or is something other than binary. ...
[5 replies] Last: Awesome. Thank you so much. I changed my last part of the code to this... (by Frank Stolfi)
Aray of strings
 
I don't know why this is working. It seems good to me. Please help. #include <iostream> #include <string> #include <fstream> using namespace std; in...
[4 replies] Last: What did you mean by that? Note: this program shouldn't even compile... (by jlb)
What does this function mean?
 
I get what getline function does; however, can someone translate to me of what indata.open(file name.c_ste)) does? I know it opens the file, but what is c_stR? ...
[4 replies] Last: is used for quotation marks in the end?... No ist is used to convert ... (by MiiNiPaa)
map find function
 
i have map like this 1=>5 2=>1 3=>2 4=>3 5=>1 now if i use find func. like this it=mymap.find(2) then it will point 2=>1 or 3=> 2 as both contain ...
[1 reply] : http://en.cppreference.com/w/cpp/container/map/find [quote=reference]F... (by MiiNiPaa)
by mazam
c++ and VS 8
 
What does the : and comma signify I am using VS 8 and programming in C++ : m_lMaxWidthSpltColOne(0) // maximum width for 1st column , m_lMinWidthSpltCo...
[2 replies] Last: what does + means in this part of code: + ? Give us some context! I... (by MiiNiPaa)
best way to print error and terminate
 
So I have written a math tutor program for first, second, and third graders. I used if/else statements for the whole thing and when i finally finish I read i ne...
[6 replies] Last: try { //some code here... } catch (/*Some exception name her... (by Smac89)
by sqoots
All sorts of errors
 
My program was compiling fine until just recently, when a bunch of errors appeared. I cannot figure out why they exist. The errors are as follows: (30): warn...
[9 replies] Last: I compiled every time. I just shut down VS and opened it back up and ... (by TheIdeasMan)
Easy way to embed a text database
 
Hi, can someone please help clarify what would be the right way to embed a text file into the exe file? I have several text databases. I do not want them to rem...
[8 replies] Last: Andy. You have been extremely helpful, as always. Thank you so much!! (by igorland)
classes
 
lass Person { public: Person( string, string, int ); void setFirstName( string ); string getFirstName(); void setLastName( string ); strin...
[1 reply] : use setAge() to set the age: person.getAge() = person.getAge() + 1... (by coder777)
G++ on Linux - error message - Help !
 
I'm using Ubuntu 12.04 and Bash. This is what I enter:- g++ -o Bob19 Bob19.c and for 'Hello World' works fine ! But I came unstuck with trying to ge...
[8 replies] Last: In case anyone stumbles in this Do Loop thread here is what worked !... (by timmoore46)
Help with Pointer Program *debugging*
 
Here are my Instructions: TASK #1 – Define the Class Write a class called ServerGroup, which will be a simple custom-made data structure. It will be spe...
[5 replies] Last: thanks for the help man. i finally got the program to compile and the ... (by byronflds)
Big problem! C++
 
Hello, I have really serious problem on my programm I have a txt file Tr1 6 1.5 -5.5 5 -1.4 8.5 -5.2 Aps3 3 5.5 -5.5 10 Kt4 8 -3.5 -0.5 -3.5 5.4 2.4 5.4 2.4 -...
[1 reply] : Hello, I have really serious problem on my programm I'm sorry, but... (by rodiongork)
Problem with Modulus Operator
 
Hi there, have been working on final question to course work and have come across some problems with getting my modulus operator to work. I am trying to find ...
[3 replies] Last: Thank you for your help Bingo! (by campurdy)
Is my code right?
 
Write a program that computes the amount of money in a bank account using the compounded interest formula. A = P(1 + r/100*k)^k*n You should ask the user to...
[1 reply] : Yes, mostly it looks all right (I suppose you test it to see if it wor... (by rodiongork)
File txt reader
 
I have this code I wrote today in class. I am nearly complete but I need to to add the total cost for each item but I don't know how to come up with an equation...
[2 replies] Last: thanks dude! It really helped and I was able to make a sense of why yo... (by Modern Man19)
Need help with a problem using discounts to figure a final price.
 
The local t-shirt shop sells shirts that retail for $12. Quantity dis- counts are given as follow: Number of Shirts Discount 5–10 10% 11–20 15% ...
[1 reply] : This code uses a bunch of if and else ifs to set the new price of the ... (by vasilenko93)
While Loops
 
Im trying to use a while loop here for a total of four times. Unfortunately, its not working correctly. At first, I type in my name and how many boxes were sold...
[7 replies] Last: No, there is no solution. You have to use getline for that. And it is ... (by MiiNiPaa)
October 2013 Pages: 1... 5455565758... 86
  Archived months: [sep2013] [nov2013]

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