Beginners - February 2016 (Page 17)

Size of array too large
 
Hello! I am writing a small program and I need an array that contains 1.000.000.000 numbers. When I compile it, I get the error "size of array 'v' is too large....
[3 replies] Last: You are allocating 1 billion numbers. If those numbers are integers, t... (by dhayden)
NEED SOLUTION 2
 
7) Write a program to create a customer’s bill for a company. The company sells only five different products : TV , VCR , Remote Controller , CD player, and T...
[2 replies] Last: Please stop spamming the forums, we're not your slaves. Post in The jo... (by TarikNeaj)
NEED SOLUTION
 
Write your question here. 4) Implement the program which reads a character from the user as the indication of color of the traffic light, and send a commen...
[2 replies] Last: And I need a billion dollars so I guess we're on the same boat. On a ... (by TarikNeaj)
How to divide a string into pieces.
 
Hi guys, I have a text file in which lines look like this: string, int string. And i would like to divide it and send every element to its structure. ...
[1 reply] : For this, I would look at the standard regular expression library (int... (by TheToaster)
A program which finds the divisors of the numbers
 
This is the decision given in the book but for some reason it doesn't work at all when i type in odd numbers like 3, 5, 7, 9, 11, 13 etc. Also i can't understan...
[4 replies] Last: Thank you very much for the good explanation. This helped me a lot. (by Gondvanaz)
Using Loop problem
 
Hi all, below is a code I have written so far for my assignment. What I am suppose to do: The program uses a loop to prompt the user to enter the custome...
[3 replies] Last: What am i doing wrong here? Probably input. If you move what I sa... (by TarikNeaj)
Converting a string of words of arbitrary size to an array of C strings
 
Hello! I am working on the below program right now. I am asked to convert a string of words to char array. The libraries included are the only few that I can us...
[1 reply] : Since main function can not be altered, I have to return an allocated... (by cire)
Understanding strcmp implementation in 'C'
 
The below function is from the link: http://clc-wiki.net/wiki/C_standard_library:string.h:strcmp It's the strcmp implementation in 'C' and i am guessing t...
[4 replies] Last: Thanks man! =] (by etrusks)
by nanJIL
Increment and decrement operators
 
What differences between ++a & a++? Result? int a = 5; ++a; // means a= a+1 cout<< a; cout << ++a; cout<< a; int a = 5;...
[1 reply] : Wouldn't it be faster to try running it? (by helios)
Grade book program help
 
Ok so im making a grade book program and i am slightly stuck i need to ask the user how many students they have grades for and then the name of the students alo...
[1 reply] : What are you stuck on exactly? Just ask the user for the number of sco... (by DeathLeap)
by leeram
Help with MultiplyPolynomials issue of c++
 
Hello everyone , This is my first post . Recently , I got problem from c++ exercise question of book , please step by step to help me , thanks a lot at advance ...
[no replies]
Why are my files not opening?
 
#include <fstream> #include <iostream> #include <cstdlib> using namespace std; int main() { ifstream in_stream; ifstream in_stream2; ofstream out_s...
[8 replies] Last: Ok, The input files need to be in the same directory as the executable... (by TheIdeasMan)
Hex addition program.
 
I am writing code to take input and then convert it from decimal form to hexadecimal form, then add said hex numbers and display them. I know that what i have i...
[3 replies] Last: what is stoi? s tring to i nt... (by integralfx)
by BigMMM
can you guys help me write this program?
 
.
[5 replies] Last: How do you expect to learn if you let others do it for you ? (by SamuelAdams)
Managing larger projects
 
I've been messing with SDL2 lately as I've peaked an interest in game development. I'm not having any issues code related but rather a project scope issue. I'll...
[2 replies] Last: SDL2 is a library though, isnt it? So what are you suggesting? (by CGunn86)
Help with output (random spacing problem)
 
so I'm writing a program that will output a ratio of anything the user types in, and it's all working - the problem is that the output prints with a space befor...
[3 replies] Last: getline(cin>>ws, itemOne); Skip whitespace before extracting th... (by cire)
Returning value from a void function
 
I want to return the add value from the void function to the main and output the answer in the main. How would I do that? #include<iostream> using namesp...
[2 replies] Last: Or have additional function argument (references are neat too): void ... (by keskiverto)
Show all numbers betwen 2 variables
 
How to show all numbers betwen 2 variables example from variable n1 = 1 to variable n2 = 10 Thanks
[2 replies] Last: Oh :D Thank you so mutch :) (by armando2)
A program which determines if a given number is prime or not
 
Hi. So... basically i can't understand why the program "thinks" 2 is a prime number. I mean... i know that 2 is a prime number but i can't get why the program t...
[7 replies] Last: It is easy to test: #include <cstdio> int main() { int num = 7; ... (by keskiverto)
passing functions
 
I'm having problems understanding how to pass a function. It is giving me that a and b is not declared in this scope. using namespace std; #include <iostre...
[9 replies] Last: thanks =) (by aerichsen)
February 2016 Pages: 1... 1516171819... 46
  Archived months: [jan2016] [mar2016]

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