Beginners - September 2012 (Page 18)

by kino
how to make a simple math calculation
 
constructing a program that will ask the user to input calculation
[no replies]
by skarla
iterators help
 
#include <iostream> #include <algorithm> #include <vector> using namespace std; template <class T> T fn(T a,T b) { vector<T>array; vector...
[7 replies] Last: Can tell me now why should put typename? Simply put, because it is ... (by clanmjc)
recursion
 
void test(int); int main() { test(5); while(!kbhit()); return 0; } void test(int x) { if(x>1) { test(x/2); test(x/2); } printf("*"); } ...
[no replies]
by bugz
Hello Peaople help please !
 
Hello how do you write a program using a link list for a particular stack that will store data of the type char. Calling a member function named pushing to pus...
[no replies]
How to determine what bits are set
 
Hello, I am working on this project where when I receive a value and its 11th bit is set I need to do something in particular. With this being said, I want to ...
[3 replies] Last: It can be simple done by using condition if ( value & ( 1 << 10 ) ) ... (by vlad from moscow)
reading in from datafile, how to skip rest of line?
 
I'm new so bear with me. I have a datafile that contains a function I need to perform, then an integer or two I need to perform them one For example: ADD ...
[1 reply] : datafile.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); ... (by Peter87)
sorting a heap
 
I've been trying to get a functional Heap Sort working, and well, it is functional, but the function to sort the heap takes too long, I could really do with som...
[6 replies] Last: Okay, I've decided to try this again, but I haven't even had a chance ... (by Zephilinox)
compare 2 vector lists
 
Hey everybody, i write a small programm which contains 2 vector lists and everything i want to do is to compare both vector liists. i believe this is a easy ...
[1 reply] : You mean probably std::vector. comparison operators do exists. So std... (by coder777)
[absolute beginners]problems about base Conversion
 
Here are the short guide line and requirements. Write a C++ program to convert a base 10 number to base b. The program should first prompt the user to enter tw...
[1 reply] : On line 26: don't return 0, instead: "" What you need is the modulus ... (by coder777)
New to CS; Need some help with HW
 
Hi guys. I'm taking my first CS course this fall. Pretty neat stuff. So we have this assignment due in a couple days. I have it working and everything; I'm ...
[4 replies] Last: @chipp The values for x and y need to be more then just integers, I wa... (by Momojams)
looking for advice
 
hi guys, I am trying write a simple program which reads from a text file line by line, and convert each line into an integer and store it into an array. ...
[1 reply] : atof does not take a std::string: http://www.cplusplus.com/reference/... (by coder777)
Function to Print Income of Employees with Name in Descending Order of Income
 
Hey C++ Friends, So in my PrintData function i have printed out the employees and their new incomes displayed as required by my assignment. However the last ...
[3 replies] Last: u'r welcome XD (by soranz)
Help me to my Array Code [Prob : else function]
 
Help me to fix the else for the output! in that code the output is correct my problem only is the else when i enter the numbers that have in the array index...
[2 replies] Last: hey pal, take one boolean let's say, bool found = false; make your ... (by HiteshVaghani1)
fstream beginner program help
 
This is my very first fstream program, and it is completely confusing to me haha. 1. Consider the following incomplete C++ program: #include <iostream...
[3 replies] Last: I apologize, i was under the impression you were writing to the same f... (by Need4Sleep)
prime number function help
 
so i have an assignment to write a function to tell a user "true" is a number is prime and "false" if it isn't. heres what I have so far: 1 #include<iost...
[1 reply] : // Includes #include <iostream> // Function prototypes bool isPrime... (by Lowest0ne)
problem while passing input args in C++
 
Hi, I am trying to pass input arguments in my C++ code, so I have declared my main method as main(int argc, Char *args ) and when I have my input argument then ...
[1 reply] : if (argc>1) .. if that evaluates true, it does not mean that args ... (by cire)
by MW130
What am i doing wrong? SDL-C++ program
 
hello I am trying to open a screen with an image saying hello. It shows no errors on xcode, but when I run the program, the screen pops up black. It is just a b...
[6 replies] Last: Double check and make sure it's even a directory problem. Try specify... (by Disch)
homework circle class
 
Hello all, I am currently working on a homework assignment below create a circle class that has the following member variables radius: a double ...
[1 reply] : I think that you shouldn't have made that left turn at Albuquerque. ht... (by ne555)
by sch518
How can I read in this line of input?
 
I need to read in: add 101 1011 I need to save add to a string and the two numbers to ints. The only way I can think to do this is saving the entire inpu...
[1 reply] : std::string ch; float num1, num2; std::cin >> ch >> num1 >> num2; ... (by DesiredNote)
Need Help on Homework
 
Hi I am having a bit stuggle with my homework problems. can someone please help me solve these and explain how each program works thanks! 5. Create ...
[1 reply] : For 5 and 9: I find that getting some graph paper out and treating eac... (by Duthomhas)
September 2012 Pages: 1... 1617181920... 62
  Archived months: [aug2012] [oct2012]

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