Beginners - March 2011 (Page 18)

by jpina
Converting int to string. (or char)
 
I'm trying to make a program that will convert decimal to binary. I think I have the steps right but I need to put each character into a string or char array t...
[1 reply] : output.push_back(temp+'0'); push_back is the method to add chars.... (by hamsterman)
by ross21
quadratic equation help
 
#include <stdio.h> #include <math.h> void quadraticplus(double, double, double); double i, o, p, ans4; main() { printf("Enter the three variable...
[3 replies] Last: If you use C++ you can actually work with complex numbers: http://www.... (by hanst99)
Retrieving Values from a Text Document
 
Hello. I need to write a program that will retrieve numerical values from a text document. Say the values are 5, 7, 12, 41, and 2 In the text document,...
[2 replies] Last: Wonderful? Wonderful?! How dare you call us a wonderful community you... (by Albatross)
by samoi
why there is error in this statement?
 
b.getavailable()=0;
[16 replies] Last: this is my code I think there is a logical error but I don't know wher... (by samoi)
by Janlan
Sum of row - matrix
 
Hey! I have problem with finding the sum of first row. ex. 1 2 3 = 6 4 5 6 = 15 7 8 9 = 24 Tnx for the help! :))
[3 replies] Last: This is what you are after: rowSum += v ; columnSum += v ; // N... (by PanGalactic)
Editing a tic tac toe program.
 
Hi, below is my program currently. it works fine and everything. // Include the libraries #include <iostream> #include <string> //Use the stan...
[4 replies] Last: i'm kind of following... but not totally. (by airguitarman94)
Need help with a program!!!
 
Ok, so i created a Tic Tac Toe program, and i need to tweak it a little so that i play against the computer. can i get some help for that? (computer needs to pl...
[3 replies] Last: yes, i think it is a duplicate... and yes, what kind of code should i... (by airguitarman94)
very simple
 
what is n = (n<0) ? -n : n; means?
[2 replies] Last: In mathematics, it means: n = |n| (by moorecm)
HOW TO WRITE IT WITH FUCTION AND ARRAYS ?
 
#include<iostream> using namespace std; int main() { int grade ,quiz,numberofquizes,totalquiz=0,maxquiz,minquiz; float avaragequiz=0; cout<<"\nhow many qu...
[6 replies] Last: In case you aren't a troll, the idea was that you should wrap your cod... (by hanst99)
......................................................
 
...............................
[4 replies] Last: Open a terminal and use g++. If it is not installed, Ubuntu will tell... (by moorecm)
How to find out the size of std::list?
 
my os : windows xp sp3()32bits compilers : gcc4.5(minGW) std::list<size_t> haha; haha.resize(10); std::iota(haha.begin(), haha.end(), 0); //initial...
[2 replies] Last: Thanks a lot, maybe someday I have to implement my allocator But looks... (by stereoMatching)
by caneta
Perform a find into a boost::variant vector
 
I have this situation: typedef variant<myObj<int>, myObj<float>, myObj<double>, myObj<string> > var_t; vector<var_t> vec; vector<var_t>::iterator it; With...
[2 replies] Last: One way to do it is to count the number of times operator() is called ... (by jsmith)
Where to use std?
 
Hi all, I have just started to learn c++ and have encountered a small problem. I have found the following two versions to do the same thing: #include <io...
[4 replies] Last: Ignore ramandpsingh, is a spammer. The compile time shouldn't change ... (by Bazzy)
bool type
 
I read some info about "bool" before and there I remember it was written bool type is implemented as int in some systems.Is it so? In my system I see sizeof b...
[2 replies] Last: Thanks for your comments. (by oldnewbie)
Retrieve Values from a List; also, How To Determine Minimum Value from a List
 
Hello. I have two questions - 1) I need to retreive values from a text document. How do I do that? I am writing the text document myself - so the format is ...
[1 reply] : Reading data from a file is simple: #include <fstream> #include <ios... (by ModShop)
Make a square with a diamond in the middle
 
Dear C++ Progreammer, for a while I think about making a square with a diamond in the middle, if one of you have an idea about it, please look my design : ...
[6 replies] Last: Waow, thanks for your answer.... Thank's for m4ster r0shi too. Hmm, ... (by fuadfauzi)
by pekde
Variables in array as an argument to function
 
Hey guys, been awake almost all night trying to find desperately a solution to my problem. But it seems like this one is too hard for me this time. In my progr...
[3 replies] Last: [quote=pekde]I would like also to know, if it is possible to use array... (by matsom)
by snc413
Help I need help for this program?Am I doing the program correctly?
 
the bank offer two types of account saving and checking.Every customer must maintain a minimum balance.If a customer's balance falls below the minium balance, t...
[1 reply] : 1. Use code tags 2. the switch statement is missing a closing brace 3.... (by matsom)
Help with switching program
 
hi guys, new to programming and i am a week behind our tutorials. i need to get 3 other qus done for last week. Basicall i have to assume the processing o...
[5 replies] Last: Use a while loop or something similar. (by firedraco)
Grade array trouble
 
I'm having some trouble with my sum not adding up properly, I'm not exactly sure what's going on here. I'm new to C++ and still trying to get this stuff down. ...
[2 replies] Last: Thanks I figured it out! I had grades instead of grades .. (by xterragator)
March 2011 Pages: 1... 1617181920... 52
  Archived months: [feb2011] [apr2011]

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