Beginners - August 2017 (Page 14)

by Handge
How to output a sound in the Mac Terminal
 
How do I output a sound in the Mac Terminal? It can be as simple as a beep or a bloop or anything along those lines. Now how would I play the sounds in the back...
[1 reply] : Hello Handge, I am not familiar with a Mac, but you might try std::c... (by Handy Andy)
Declare members of an array in a class
 
Hello! I have an array of strings and I want to declare several variables in a class whose names are the elements of the array. Something like this: clas...
[12 replies] Last: #include <iostream> #include <string> const int SIZE = 5; class Stri... (by closed account 48T7M4Gy)
what is WIN32_FIND_DATA and how to use it?
 
Can anybody give an example of WIN32_FIND_DATA and how to use it?
[1 reply] : A simple websearch leads to Microsoft documentation. Therefore, Micros... (by keskiverto)
The sum of the components in vectors.
 
How can I get the sum of the components that I introduce in v ? int v ,a,b,i; cin>>a; for (i=0;i<a,++i) { cout<<"v["<<i+1<>v ; } b=//how...
[2 replies] Last: Once you master the material in the tutorial, then the standard librar... (by keskiverto)
no match for 'operator[]'
 
Hello! I have this code from someone else (that I can't contact for a while) class Histos { private: map<string, TH1F*> hisNumInputStubs_; } void Histos...
[1 reply] : Maybe check the syntax and examples of map::insert() http://www.cplus... (by Chervil)
by Nick89
Convert character to operator
 
Hi all, I have an assignment for my uni course which requires me to convert a character which has been input into the command line arguments to an operator....
[1 reply] : It depends on what your assignment needs you to do. Is it simply a ma... (by Chervil)
threads
 
Hello there, I was wondering if anyone may know of a way to control a timed loop without using concurrency. As it stands I am using threads to carry out operat...
[3 replies] Last: > if any of the dofunc()'s depend on stdio then they'd block the progr... (by JLBorges)
Recursively find 1s in binary
 
Hi, I am writing a program to help me find the number of 1's in binary representation of a number. Using recursion was one of the requirements. However, when I ...
[2 replies] Last: #include <iostream> int countBits(unsigned long n) { if (n == 0... (by tpb)
Trying out *getline(cin, VarName)* Help.
 
I'm trying to enter a name the second time the loop goes but it skips the entering phase for the name each time. I cannot for the life of me figure out why. ...
[1 reply] : When you enter the minutes you type some digits and then press enter, ... (by tpb)
Help pls on pancake glutton
 
Hi, im trying to work on cplusplus beginner exercises but got stuck on this, how can i sort the data along with their respective person . #include<iostream.h>...
[5 replies] Last: Hello Thesimch The more I look at your program the more I feel that y... (by Handy Andy)
function template explicit instantiation
 
As an exercise on function templates. Xcode complains about both explicit template and the template. Can anyone help please!! Thanks in advance. templ...
[1 reply] : Note that you don't have a templated function, Max . One returns not... (by cire)
Deletion from a circular linked list
 
Hello there, I have been having a few problems recently while getting to grips with a template circular linked list for learning purposes. Sometimes when I try...
[4 replies] Last: dhayden, Thank you so much for your input the code worked perfectly.... (by helixprog)
Matrix class and some compiling error
 
Hey there, Im getting an error when compiling the following code and I would like to know where does it come from. Basically, Im starting to create my own matri...
[1 reply] : Do not include one cpp file in another cpp file. Just include the head... (by JLBorges)
by shalzy
Assigning operations
 
HI guys, i am stuck on one part of my code. I need so assign "-, +" operations to a character. I can't figure it out.
[1 reply] : char operation ; // ... operation = '-' ; // ... operation = '+' ; //... (by JLBorges)
Creating a funtion that return a memory adress
 
I gotta implement a code where I need to enter a certain matrix A(5x5) and then call a function that returns a pointer ta a array B that contains the sum of eac...
[2 replies] Last: Perfect! I was not getting how to return a pointer but now I got it! t... (by Lucas Fiorini)
Simple Programming Problem
 
Hi there, I have completed the program but I am having trouble with my output. It seems my "star" is outputting more more than 1 star than usual. Question: Wri...
[10 replies] Last: I started at "i = 0;" then i <= 2230; then which increments by 1000. ... (by dhayden)
by pizza
Outputting garbage
 
Hello Thanks in advance for your interest. I am trying to make a standard deck of 52 playing cards. And below is the output that I want to create. ===========...
[4 replies] Last: Thanks you all~ I really appreciate it!! (by pizza)
Saving lines in file to variable.
 
I'm trying to save data from a file to variables in my code and it is not working as intended. Here is the code #include <fstream> #include <iostream> using ...
[9 replies] Last: It was missing in.ignore. That was it. (by skyrimpimpo)
Outputting input and output to both console and file
 
Below are the instructions for my final course project, I spent a good three/four hours writing the code a few nights ago, but I realized at the end of the inst...
[4 replies] Last: Thank you so much, it worked like a charm. I don't know how I missed p... (by subeydoo)
User Defined Array, Pointer Help
 
Hello, been lurking on these forums for help these passed couple weeks. Very helpful. I registered today as I cannot get a program to run. It is for my college...
[6 replies] Last: JLBorges, Everything compiled perfectly. Thank you very much! I could... (by louiesluck)
August 2017 Pages: 1... 121314151617
  Archived months: [jul2017] [sep2017]

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