Beginners - March 2022 (Page 5)

Undefined reference to a C function in C++
 
Hello, I am facing this problem and i don't know what to do now, i am trying to use a C library to parse a math expression stored in a string i included the hea...
[2 replies] Last: [quote=Mamo Grag]The command that i use to compile : g++ main.cpp ope... (by TheIdeasMan)
by AAAbb7
Trouble declaring some variables
 
I'm supposed to create a menu, but when I try to run my program in codeRunner it says that a few of my variables were not declared, how can I fix that? #i...
[1 reply] : You're trying to call functions named "readMovies", "readRatings", "pr... (by Peter87)
by AAAbb7
The output of my code repeats the same number
 
The problem with my code is that it just gives an output of the "return -3" for example: "//User name exists, non zero rating cout << getCountWatchedMovies("emm...
[5 replies] Last: We were not fixing the problem yet. We were just figuring out what the... (by keskiverto)
by vboro
Problem with exp() function in C?
 
Greetings! I have a C code in which I count the descreasing of a satellite. I translated it to C language from the original (QBasic, see link below) but the ex...
[18 replies] Last: https://en.cppreference.com/w/cpp/utility/format/formatter#Standard_fo... (by George P)
What happens behind the scene (and by whom) when heap memory is deallocated?
 
A couple of what's-under-the-hood questions floating in my mind, having to do with freeing memory: 1. How does a program know what part of its virtual addres...
[2 replies] Last: 1. Where things go in VM is decided by the OS, not the linker. https:/... (by salem c)
by Ch1156
Cant insert element into map
 
Ive been playing around with maps and I decided to write a small program to test it out and ive gotten stuck because i cannot insert any elements into the map i...
[17 replies] Last: Exactly! And that's the reason for the ... Iterator iter = m_contain... (by againtry)
Array Problem
 
Output: Names Forward: (Names) Scores Forward: (Scores) Names Reverse: (Names) Scores Reverse: (Scores) (#) results for (name) Minimum: ... Maximum: ......
[2 replies] Last: Well at least the input file has been provided... What is the 'array'... (by seeplus)
Need help on code correction
 
Hey , I need help , everytime I type in a name and surname of the person it just throws a loop. I can only type the name . do I need to change the string? #i...
[5 replies] Last: enum class_t { FIRST, ECONOMY, INVALID }; class_t determine_class( c... (by JLBorges)
inserting a switch for my menu
 
inserting a switch for my menu instead of using while (option == 2) and also the program is supposed to re run for the number of workers you put in. #inclu...
[3 replies] Last: Not sure what you after re while, option 2 etc, but possibly something... (by seeplus)
g++ is compiling the files in include directory wich i don't want to
 
Hello, I am trying to compile a program, i have the source codes in /home/my_app/ and the library that i will use in /home/my_app/include , when i am try...
[1 reply] : gcc/g++ does not compile any source code files, unless you either ex... (by kigar64551)
Error using blitz
 
The error is - CRT detected that the application wrote to memory after end of heap buffer. I am using visual studio 2019 and imported blitz++ by nuget #inc...
[3 replies] Last: Sorry. I was think thinking that Array was referring to std::array - n... (by seeplus)
Destructor
 
I created this class.. class War { private: string place; list <soldier*> soldiers; // list with pointer soldier for all soldiers public: War (...
[5 replies] Last: The STL <list> is destroyed automatically so doesn't have to be treate... (by againtry)
stumped on password check program
 
goal: Output "Valid" if input contains no more than 4 numbers and input's length is greater than 4. Otherwise, output "Invalid". issue: program won't load...
[7 replies] Last: I did mention it was a first pass, sloppy bit of code. Which was bei... (by George P)
How to count number of letters in words that start with d?
 
So I need help with this code im doing for an assignment. I have the first part down which was to open and process a file and report the number of words with th...
[6 replies] Last: I got it to work, thank you all! (by myriad6860)
Repetition structure (FOR)
 
Hello, I have to prepare a program that from the year interval [m;n] selects the year that the festival took place and next to that year also shows which festi...
[4 replies] Last: [quote=Krakenvangh]my teacher isn’t really teaching those things and... (by George P)
How to pass a simple math operation stored in a string to system then get the output
 
Hello, I have a ustring that stores a simple operation for example : "2+3/4" The problem now is that i am using Gtkmm and the entry support only ustring not ...
[5 replies] Last: If you are going to recognise precedence, then you are going to have t... (by seeplus)
uninitialized local variable
 
I'm not sure this will post in a readable format, so I apologize in advance for that. (I read how to input it, but my computer is not showing the (#) edit symbo...
[3 replies] Last: Lets look at this part: float annualIntRate; // annual interest ra... (by keskiverto)
Reversing multiple inputs
 
Program Challenge: Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user e...
[6 replies] Last: #include <iostream> #include <string> #include <vector> #include <alg... (by lastchance)
by dede67
output
 
Write your question here. #include <iostream> using namespace std; class Shape { public: virtual Shape(); virtual void draw() con...
[6 replies] Last: What does "output code" mean? (by keskiverto)
Output range with increment of 5
 
Problem: Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 5 as long as the value is less than or ...
[3 replies] Last: Fixed program w/ loop + bool: #include <iostream> using namespace s... (by seaminusminus)
March 2022 Pages: 1... 34567
  Archived months: [feb2022] [apr2022]

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