Beginners - April 2019 (Page 9)

Trying out with coding and with some questions
 
I had tried to write a new code over the last few days. Please feel free to comment on them if you can. #include <iostream> using namespace std; //t...
[2 replies] Last: but 3 in code reads result = function(args); digging into best practi... (by jonnin)
Looping C++
 
SOLVED THANKS
[2 replies] Last: thank you so much @lastchance, I really appreciate that (by oninoor)
Identify math expressions
 
Is there any library I would use to id math expressions within general text. for example "let X and Y be random variables such that X ~ Norm(X^2, Y)" for exa...
[6 replies] Last: Thanks, @Helios, and @Jonnin I'll try to apply all your suggestions se... (by closed account SECMoG1T)
by ericM
update item in a std::set
 
Hello, I am trying to modify an item (an object) stored in a set. I know its position in set, so I can retrieve it via iterators, in code: #define I_T...
[4 replies] Last: extraction and reinsertion worked fine for me. Thanks all for the cla... (by ericM)
Star Search (Now with arrays)
 
Hello, I am needing some serious help on this. I don't understand how to use arrays at all, and I don't know how to use functions well either. The intended goal...
[1 reply] : Arrays are just variables that store a specified amount of info. i... (by closed account N8MNAqkS)
#include <cctype>
 
In a book for C++ for class, it says for functions like isupper, islower,isprint etc. the header file <cctype> is needed. I tested out on visual studio without ...
[3 replies] Last: Visual studio's "pch.h" (the header they use now which replaced "stda... (by deleted account xyzzy)
by JimBob
Trash output when inputing a char into an int
 
Really loving how the body is already preset with "write your question here" and the proper flag for our code. ANYWAY!! I'm not necessarily having an issue (...
[5 replies] Last: #include <iostream> #include <limits> int main() { int response =... (by deleted account xyzzy)
geting input from specific keys
 
I pulled this code off an older thread while I was learning how to get input from specific keys on the keyboard, rather then using std::cin as a way to simulat...
[no replies]
Need help passing a 2dArray of a Structure by reference!
 
I'm having trouble passing a 2D array of a structure and editing it in a function. I just typed up a quick little example code to maybe give anybody an idea of ...
[1 reply] : It would help you in the long run, if you would describe the trouble a... (by keskiverto)
by cutwo
feedback needed, please
 
Please help to fix code for project submission. I am trying to create a menu with a heap. I am using repl.it to code with three different files. Please review f...
[1 reply] : Hello cutwo, I am trying to create a menu with a heap. This state... (by Handy Andy)
by M22878
I'm trying to create a program that randomly plays audio files on a continuous loop.
 
This is the code I currently have. Can someone help me solve this? #include <iostream> #include <windows.h> #include <mmsystem.h> #include <string.h> ...
[6 replies] Last: Furry Guy, that fixed it! (by M22878)
compiler skipping over a line of code
 
The program is a lab for my intro c++ class. It is meant to use file stream to write and read data into a file. Everything works fine, except in the writeData...
[2 replies] Last: Just so you're clear, this has nothing to do with the compiler. The f... (by salem c)
by cash
complex number to power
 
My program performs operations on complex numbers, however, I'm confused on how my exponent function can take only one complex number and take it to a power. I ...
[2 replies] Last: I keep on getting an errror. What is the error? Post it here, pleas... (by deleted account xyzzy)
by Faizts
I need this to add 2% discount in Pizza Price if it Increase RS.5000
 
Menu Base Program Press B for BBQ Pizza Press S for Smoke Pizza than ask for small pizza or large pizaa than add quantity than if price exceed 5000 tha...
[4 replies] Last: Thanks to all of you for your support so much response thanks guys (by Faizts)
Counting values in map
 
hello, Is there an easy way of counting values in a map? I want count how many occurences there are of X, Y, Z etc in a map.
[3 replies] Last: #include <iostream> #include <map> #include <functional> #include <tu... (by JLBorges)
by kenken
While Loop Help
 
I know this isn't the right forum for Python but I am hoping someone can help me. I just started picking up Python along with C++. I am having trouble with this...
[1 reply] : I get 14 with both codes. In both cases you input the number AFTER te... (by lastchance)
can i make my own working functions
 
is there a way I can make my own std::cout function that actually prints something to the console window. I just learned how to use namespaces and I got the ide...
[2 replies] Last: #include <iostream> #include <iomanip> #include <ctime> namespace my... (by JLBorges)
Ideas for AP project?
 
I have to make a program using C++ for my AP class. There are a bunch of requirements for it though and one of them is that it needs to have an algorithm that h...
[1 reply] : maybe you could sort something and then search it more efficiently bec... (by jonnin)
Return 0
 
Can someone show me a program or a few programs in which the return 0 function is used for something. I want to learn more about what it can do, if anything.
[2 replies] Last: That would be impossible, because once main() returns, the program end... (by helios)
what do i need to know to make a video game
 
I have always had a love for video games. I have wanted to make games for such a long time. and I want to make it a career (I mean if people can make a living o...
[9 replies] Last: You might enjoy Casey Muratori's "Handmade Hero" series: https://handm... (by mbozzi)
April 2019 Pages: 1... 7891011... 24
  Archived months: [mar2019] [may2019]

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