Beginners - December 2015 (Page 20)

static in local func
 
how dangerous to have a static var in a local func? void MyListWidget::sortSongName() { static int a = 0; if ( a == 0 ) { sortItem...
[3 replies] Last: i see thank you all guys (by xenoviaquarta)
Need help correcting old test questions
 
*write the prototype and header for a function called compute. The function should have three arguments : an int, a double, and a long (not necessarily in that ...
[3 replies] Last: The order in the prototype and header must match exactly. But other t... (by JayhawkZombie)
For loop causing program to crash
 
Hi, I'm writing code for a number drawing simulation where a pool of 24 balls are drawn 3 times without replacement. Then running this process 1000x times, and ...
[2 replies] Last: You have at least two problems with your code: 1. your for loop will ... (by closed account E0p9LyTq)
[HELP] Curl
 
I downloaded some Curl libraries but where do I need to put them so my Windows Visual Studio can see them? Thanks anyway!
[1 reply] : http://stackoverflow.com/questions/23614146/adding-curl-library-to-vis... (by JayhawkZombie)
2 strings, the second one has to be a substring of the first
 
if (str == str2) else if (str != str2) string str2 = str.substr ();http://www.cplusplus.com/forum/general/
[1 reply] : To find a substring you need to use the find function of the string. h... (by Thomas1965)
use random to get a number die
 
I wrote a program about getting a die number. But this die will give number 1, 2, 4 , 5 , 7, 8. Therefore, i used if control statement to get these numbers. How...
[2 replies] Last: You need to use srand to seed the random number generator, otherwise y... (by Peter87)
Help for my project that I have done but not working out propelry (*may be syntax problem)
 
I have done my project. Everything ia working out fine. But teacher told me to complete it with multiple classes. so ive done it. but thngs are not working out ...
[5 replies] Last: Thanks , Tom56785 . I have completed. :) . Thanks for your co operatio... (by NormanBiswas)
Using a function that's already been used...
 
Hi, (Bear with me here, total C++ noob) I'm currently making a simple ATM program for our Programming Subject. I got around to making the core components of t...
[4 replies] Last: PS: I know, using goto is a sin. Well, don't do it then :+) This is... (by TheIdeasMan)
by coll97
How to prove it?
 
Anyone knows how to prove that in the int main??? (Matriu = Matrix in Spanish) The program makes de sum of two square matrix #include <iostream> #include <ve...
[2 replies] Last: Hahahaha yes, sorry, "Matrix" is "Matriu" in Catalan, Sorry. (by coll97)
by jjang
else is being ignored? :o
 
SOS //sobs internally it seems like there is a problem with my code as it doesn't give the output as I want. I already asked my friends but they can't help me ...
[5 replies] Last: Ok so I edited the code a little bit. And yayy the counter for total n... (by jjang)
Assistance with assignment on classes.
 
Hi again. I was hoping I could find input from other members about the an assignment about classes. It goes as follows: In this exercise, you will design a c...
[1 reply] : You have done more than required. You were supposed the create one con... (by Thomas1965)
by Madjid
someone please help me with correcting this program
 
A number of points defined in a plane by means of their coordinates Xi and Yi, the number of points and their coordinates are input from a text file with the fo...
[1 reply] : Can we see example inputs and outputs? (by jgg2002)
Implementing Text Based RPG Item Menus
 
Hello. Say I'm writing a text based rpg, and when players activate an Item in their inventory I want it to open up a menu with options, such as if it is a potio...
[2 replies] Last: Storing a list of options in the item class is one way. However I am n... (by Thomas1965)
Question About my Prime Function
 
This is a short/simple program I wrote for a bigger project down the road. Program Purpose: To store 125000 prime numbers in an long long type array. If y...
[13 replies] Last: /* * C++ Program to implement Sieve of Eratosthenes */ #include <ios... (by closed account 48T7M4Gy)
initialize a binary tree within a menu
 
i have been asked to provide a menu in which we have to initialize upon pressing 1 in a binary search tree... now i know that we cannot initialize the template ...
[1 reply] : See: http://www.cplusplus.com/forum/beginner/175665/ (by JLBorges)
Constants
 
Hello all. Well, I'm still quite new at programming and utilizing self-study at home with Prata's C++ Primer Plus 6E, and on chapter 3, exercise 1. Well, I'l...
[1 reply] : Sutter and Alexandrescu in 'C++ Coding Standards: 101 Rules, Guideline... (by JLBorges)
Question about for loop.
 
The output I got was "Sum of numbers is 55." and I was wondering how it calculated that. If I recall correctly, the sum += num is basically sum = sum + num but ...
[1 reply] : Num=1 sum=0+1; num=2 sum=1+2; num=3 sum=3+3; num=4 sum=6+4; num=5 sum=... (by LendraDwi)
problem in destroying all elements of a binary search tree
 
why is it giving error ? undefined reference to `tree<int>::destroy(node<int>*)' collect2: ld returned 1 exit status template<class T> void dest...
[1 reply] : template<class T> // void destroy(node<T> *root) void tree<T>:: des... (by JLBorges)
Reading from file
 
I have ran into a problem while doing a project for a college course which I am unable to find a solution for. I am tasked to make a program that reads from...
[5 replies] Last: Thank you for that help, this does seem to me a little over my knowled... (by Yankee99402)
by beemo
testgrader. cannot compile
 
im getting an error can anyone please inform me on what im doing wrong. i am a bit new to c++. anything would help. thanks in advance. #include <iostrea...
[17 replies] Last: You could just put the main logic inside a while loop that checks to s... (by JayhawkZombie)
December 2015 Pages: 1... 1819202122... 43
  Archived months: [nov2015] [jan2016]

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