Beginners - March 2016 (Page 14)

blank space instead of number
 
So, i have a program in which i should use a natural and positive number and i shall display it's digits in a while program. I input the number but instead of d...
[2 replies] Last: Works now, completely forgot about that, Thanks ! (by ralfitul)
code skipping last cin statement
 
Hi everyone. My code keeps skipping past the cin statement after my loop. I'm trying to let the user fill in a vector, and the user enters a character when th...
[3 replies] Last: Thank you for the help. (by cplusplusnewbie25)
Inheritance
 
I am making an evolution simulator. In it Crawler obj. can create new Crawlers(reproduce). The problem is that I don't know how to pass the new born s to a vect...
[1 reply] : World.h #pragma once #include <PopSickles\SpriteBatch.h> #include "... (by AmazingBKaiser)
MultiDimensional arrays
 
Write a function that returns the sum of all the elements in a function using the following header const int SIZE = 4; double sumColumn (const double m , int...
[4 replies] Last: OMG Finally that has had me stumped for like the past two days. I am r... (by dblevins0049)
by toy
Help with finding minimum element in a stack
 
I am trying to code finding minimum element in a stack by only using stack(no other data structures, such as vectors or lists, are allowed).
[2 replies] Last: You never return anything. Presumably you should return the minimum el... (by dhayden)
can someone help me. My prof needed array and output
 
#include <iostream> using namespace std; int main(int argc, char** argv) { int size, crust, flavor, extra, order=0, total=0; cout<<"Good day! Welcome to D...
[2 replies] Last: Here is the code using an array for the size information. Also - I cha... (by dhayden)
Passing by reference (structure & function)
 
I created a function called “setToGrey” that returns no value and accepts a single parameter of type “Colour”. How would I set the red, green and blue c...
[2 replies] Last: Like this: void settogrey(colour& col) { col.red = 128; col.g... (by Thomas1965)
How to take info from webpage using c++?
 
For example, in https://www.americasarmy.com/soldier/11235 the program returns the Experience points "431,422" (or a new value at a later date) whenever I open...
[3 replies] Last: You can use the URLDownloadToFile function to download the file if you... (by Thomas1965)
For loop multiplication tables
 
I am supposed to use a for loop to call a function into main that first asks for a range of 2 numbers, then makes multiplication tables that multiply the first ...
[2 replies] Last: for (int difference = num1; num1 <= num2; difference++) change to for ... (by sylphsang)
Need help understanding List class
 
So my professor has given us the code for a List class (complete with an iterator class inside and everything). Our task is to modify it to make it a doubly lin...
[8 replies] Last: You also need to update the tail pointer when popping the last item in... (by dhayden)
by Smexhy
Description
 
Can you explain me and describe me whats that code doing? Especially that first and last line, not that one(I dont know what is that number 10, why is there). T...
[5 replies] Last: It's used for reading command line arguments that are being passed to ... (by Peter87)
displaying a multidimensional array as a table
 
I'm trying to display the contents of the array as a table, but the loop doesnt appear to be executing at all. Is there something I'm missing? #include<ios...
[1 reply] : One debug method is to add additional print commands (see below). Howe... (by keskiverto)
function help
 
So i need to create a member function to return the length of a string. it needs to return a std::size_t value. and the size() function should not change the ob...
[1 reply] : What is so confusing? If it returns just one value you may make it in... (by coder777)
Assert failing for modified bubble sort
 
My commented code is below. It a simple modified bubble sort. Problem is that the assertion to check if the array is sorted fails every time. I have printed o...
[5 replies] Last: Are there any duplicates in your array? If so the assertion will fail... (by Arslan7041)
Help with selection sort
 
Can someone explain to me how the void sortSelect(double arr , int num, int id , int qty , int rop ) works in this code? The code inputs information from a file...
[2 replies] Last: What do you need help with exactly? This function seems to be puttin... (by Viiarge)
Sortscore function creating an issue. (pointers)
 
My Sortscore function is creating an issue with my program where it changes everything to memory values so when I use the average function I no longer get a val...
[4 replies] Last: From the wiki article it seems as though it's better to subract 1 from... (by plsalinas)
Need help assignment due tomorrow.
 
For this assignment we are required to write a program that reads from a text file and says how many alphabetic characters and non alphabetic characters there a...
[1 reply] : Below is the changes I made to troubleshoot this. You can see I added ... (by SamuelAdams)
Program won't execute shipping calculation
 
Why won't my program run the calculations? I was able to compile it without getting any errors. But when I plugged some numbers in, I got 0 for the shipping c...
[10 replies] Last: I got it now. It's compiling and calculating. Thank you :) (by quantumleap)
by aarrll
Random int and double generator
 
I've written the following code to generate random int or double numbers between given limits. When I run a build I get the error message "expression preceding...
[1 reply] : You have a variable and a function named rand_float() you can only hav... (by jlb)
Square or Rectangle Program
 
I'm new to C++ and have a problem here. My code is below, I need to finish my two 'isRectangle' and 'isSquare' statements, to determine whether or not the quadr...
[13 replies] Last: Points that represent a valid rectangle? If you are incapable of comi... (by cire)
March 2016 Pages: 1... 1213141516... 47
  Archived months: [feb2016] [apr2016]

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