General C++ Programming - November 2014 (Page 7)

by dcex1
Issue with code, can't access a function in other class!
 
Hi, I would really appreciate any help for this as I am struggling a little to get my head around this, so I am essentially trying to get a value from a 'Matrix...
[6 replies] Last: Oh okay, that may be the issue actually, as yeah the constructMatrix i... (by dcex1)
Search Benchmarks
 
Write a program that has an array of at least 20 integers. It should call a function that uses the linear search algorithm to locate one of the values. The f...
[no replies]
Printing out "*" corresponding to array index size.
 
I am having trouble getting the stars to output correctly in the printStars function. the final output should look something like this: Enter a number(-1 to ...
[3 replies] Last: @raju8438: Your suggestion won't work because "we are not sure total a... (by tcs)
by cGuru
Music & Sound With C++
 
Problem: I need music that repeats/loops in the background while I am running my program. Then, when I get to another part of my program, that background music...
[3 replies] Last: Does anyone think it would cause some kind of problem down the road if... (by cGuru)
vector<std::string> pushback problem
 
I am using the vector pushback in a recursive function. But some time program crashed. how to solve the problem
[2 replies] Last: Does the recursion stop at some time? C++ doesn't support lazy evaluat... (by Peter87)
C++ exceed buffer limit = abort with cuteness
 
Hi guys, I need another help, I have this problem with my output file. Normally, i use iterative methods to compute for things. but then, as iteration go...
[5 replies] Last: Oh, I get it. you have another way of computing the trapezoidal rule. ... (by jemeripol)
Question about double pointer to a reference
 
I can't seem to wrap my mind around what is going on here. My teacher gave us an implementation of a copy constructor for a separately chained hash table. B...
[1 reply] : What are we storing into prevNode in line 1? hashTable is a sequence ... (by helios)
using getline to parse from a text file.
 
Hi! So, I have a quick question. I'm trying to make a program where it reads a text file which contains "blocks" of questions like: Type: multiple_choice Qu...
[10 replies] Last: @ LB I think it'd be fair to gather by now that the input format is n... (by Duthomhas)
Inputing intergers heap
 
So i have this assignment where i need to input heap integers and when i print the code out,, it goes from highest to lowest. So when I go like >new a =...
[no replies]
reheapify downwards
 
working on a reheapify downwards problem but I'm receiving a seg fault idk where the problem might be #include <cstdlib> // Provides EXIT_SUCCESS, unsigned...
[no replies]
help with bool and const array
 
Hey I got this program to create an array of playing cards and assign the values and suits and shuffle the array. I'm at the point where I need to output the ca...
[1 reply] : int start = 0; if (hideFirstCard) { cout >> "**"; start = 1; ... (by dhayden)
by davtk8
Reverse alternate words in a string
 
How do reverse every alternate words in a string that I read into my program: e.g. The mouse was caught in a clothes peg. reversed (including the full stop) ...
[4 replies] Last: multiple ways you could do it, could have it take in strings char at a... (by d1ff1cul1010)
Bowling Program: Need some help
 
I'm meant to write a bowling program as an assignment in my programming class. I think I'm on the right track, but I can't say for sure. Can someone with a bit ...
[1 reply] : Have you learned arrays and loops yet? Because this code would be seri... (by TheKingOfTyrants)
How is the implementation of vector::insert() ?
 
Hello everyone, I have problems with my implementation of std::vector, specifically with the function vector::insert(iterator position, T value){} and I do...
[4 replies] Last: You're not answering OP's question. He doesn't want to use std::vec... (by Duthomhas)
ncurses help on Mac OS X Xcode
 
I'm currently a beginner C++ programmer. Recently, I found ncurses and thought I'd give it a shot and experiment a bit. Downloaded the files, installed them, an...
[2 replies] Last: http://www.cplusplus.com/forum/general/113904/#msg622055 From your li... (by closed account SzUk92yv)
C++ Draw letters
 
Hi, i have no idea how to do this task, i have to draw a letter in c++ using the * character and only using ifs and for loops. to be clear the result should l...
[3 replies] Last: You are expected to draw a single letter? Or a word/sentence? For ... (by Duthomhas)
Encapsulating speed types of different animals
 
#include <iostream> #define show(variable) std::cout << #variable << " = " << variable << std::endl; class LivingBeing { protected: struct Speed { //...
[10 replies] Last: > 'return bool(stm);' could be replaced by 'return !stm.fail();' but n... (by JLBorges)
by Gyiove
Minecraft style infinity blocky world ( fopen and holding blocks in ram )
 
Hello everyone! First we will have: struct item { unsigned short type; unsigned int age; float pos ; }; struct block { unsigned short type; ...
[no replies]
SDL Set up...
 
Hi, I'm wondering if anyone wants to help me out for a couple minutes to set up SDL via Join.me or simply on the forums? I spent 2 days trying to figure out wh...
[2 replies] Last: Have you installed the libraries? (by Avilius)
C++ How does one use Array Input Checking?
 
Hey guys, as I'm googling for help on my issue, I came across a user saying that if I wanted to check if an user input has already been inputted, I'd have to pu...
[3 replies] Last: Plain arrays are far more complex and tricky to use than simply using ... (by LB)
November 2014 Pages: 1... 56789... 32
  Archived months: [oct2014] [dec2014]

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