General C++ Programming - November 2013 (Page 22)

Coin Toss
 
Can anyone explain this???? { Write a program that simulates coin tossing. For each toss of the coin, the program should print Heads or Tails. Let the program ...
[7 replies] Last: rand() returns a psudeo-random number. If you don't call srand() and ... (by AbstractionAnon)
by mick3y
Programing
 
Hi.I need help.Got assignment to make these Program but i have no idea how to do this.Please help me it worth 100 marks.I have to submit it by tomorrow. 1.W...
[2 replies] Last: oh my, no one wants to read all those questions ? what do you have so ... (by nvrmnd)
by enemy
Invalid conversion from 'int' to 'int*'
 
#include<iostream> using namespace std; int Prime (int array_ , int st) { int array_f ; int m=0; int k=0; do { int e=1; for (int i=2; i<st; i++){ if (st%...
[2 replies] Last: Hello! The task is so that I have to compute field in Ave function. I... (by enemy)
by enemy
Average array elemets value-+prime numbers<=b in the same function,-PLEASE URGENT!!!
 
Hello! I have to write function Average, which has TWO PARAMETERS, array and int. The same function has to: 1. find 5 prime numbers >= int, 2. make arr...
[1 reply] : int Average(int array_f , int st){ int m=0; int k=0; int e=1; for (i... (by enemy)
by gfppoy
Loop error
 
Hello, this is my first forum post. I am new to C++, and have come across difficulties with the following program I've written. The goal of the program is to ...
[2 replies] Last: Lol cheers mate, I feel kinda dim now xD (by gfppoy)
Lost on overloading
 
I have no idea what I am doing... For an intro class, the teacher has taught us nothing of use. And I can't find what the correct syntax in the "textbook" we us...
[no replies]
Help to change code, avoid global variables?!
 
Hello, i would like to ask for an advice on how to change my code so that i can take away my global variables but still being able to have the new values c...
[no replies]
Need Help...Trying to print out the total on my Breakfast receipt that has 8 items on it....Heres my code...
 
Everything works except the total comes out with some weird number and throws everything else off.. #include <iostream> #include <string> #include <iomanip> #i...
[1 reply] : void printCheck( menuItemType menuItems , int& total) { int c = 0; i... (by vin)
Exception Handling
 
So on the myprogramminglab there is a problem but i am stumped on Basically it is an exception handling problem Assume  the existence of a class  RangeExcep...
[8 replies] Last: void verify (int min, int max) { int input; while (cin >> input) { if... (by cool5288)
by LB
Parameter Pack Confusion
 
#include <iostream> #include <type_traits> template<typename T, typename...> struct require { using type = T; }; template<typename... Args> void ignore(Args c...
[10 replies] Last: Ah, so I guessed right. Thanks for all your help :) (by LB)
multiplying all values of an array
 
Hello. I have an array as such and need to multiply all the values of it by each other and put that as a variable. //for example int array1 //assume i ha...
[4 replies] Last: Duoas, thank you for your help. I thought my methods were flawed. I ju... (by JasperBraun)
Vector problems
 
I usually try to use my own arrays so I can resize them how I like. I am running into problems with my push_back function though. I think I've used vectors once...
[4 replies] Last: You are trying to use uninitialized pointers. There is no good reason ... (by ne555)
Neophyte Seeking Advice
 
Hi, I started my first ever programming course this fall and I discovered I enjoy programming. The introductory C++ class is winding down and the next level cla...
[1 reply] : Not sure about the books you mentioned there but I started off program... (by TheBeardedQuack)
Real Polygons
 
I am fairly new to c++, and I want to be able to draw a polygon. When I have searched for how to draw one, the only thing i can find is scripts doing things lik...
[2 replies] Last: Well first you'll want a main window program, (or equivalent if there'... (by TheBeardedQuack)
by LB
Consuming void parameters
 
#include <iostream> void f() { } int g(...) { return 0; } int main() { int x = g(f()); std::cout << "x = " << x << std::endl; } This code compiles and run...
[6 replies] Last: Ah, I meant 3.3, not 3.4. Good to know it's already fixed. (by LB)
by LB
Easier way to do this? (tuples & parameter packs)
 
http://ideone.com/vEq9cd I feel like a mad genius, but that probably means this is overly complex. I even had to look up a stack overflow answer for how to sto...
[1 reply] : This implementation really feels like overkill to me, and it just seem... (by LB)
An IDE for C++
 
I want a reliable IDE preferably lightweight which I can use for C++ coding on Ubuntu. I can't figure out what the hell cloud9 does. It opens in a browser and I...
[7 replies] Last: an ide is related to c++ programming in the same way gravel is related... (by closed account Dy7SLyTq)
program on computer base testing
 
Write your question here. Please I want to write Program on objective test,how will I write c++Program to read option,give mark to right option nd alsocalcu...
[no replies]
Array Initialization (C++11)
 
array <int, 1000> myarray; Should you then do myarray.fill(0) ?
[1 reply] : For default initialization why not just? array <int, 1000> myarray{0}... (by jlb)
Passing char arrays
 
I'm having trouble with passing a character array between functions of the same class. I have a function, buildGraph , that calls function getNextLine . The ...
[4 replies] Last: bool Prog3Graph::getNextLine(char line, int lineLen) I have getNex... (by jlb)
November 2013 Pages: 1... 2021222324... 46
  Archived months: [oct2013] [dec2013]

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