Beginners - April 2019 (Page 5)

Concatenation
 
I created a function for concatenating c-string objects and it seems to be working. However, I get a green squiggly line from visual studio and when I place the...
[2 replies] Last: Yes I do have other functions. Sorry I didn't post them as I didn't kn... (by stoneJax)
terminate called after throwing an instance of 'long'
 
I am getting this error when I try to run my code. Since it doesn't give any lines that this error occur, I really don't know what to do. Here is my code: ...
[2 replies] Last: If you don't know about debuggers, you can insert a line like cout <<... (by Konstantin2)
by stokke
Best Flushing Toilet
 
I have tested lots of toilet models with the best flushing power. If you are looking for all the elements I have mentioned that contribute to strong flushing po...
[3 replies] Last: you have to manually set the pointer to null after delete if you want ... (by jonnin)
return to last loop
 
Can i somehow return to first loop while (true) { //*first loop*// while (true) { cout << "U svojoj sobi si, odaberi sta zelis uraditi \n(izaci, o...
[3 replies] Last: #include <iostream> #include <string> int main () { std::string... (by closed account z05DSL3A)
Check a string input for specific input
 
I would like to have a user input a string, then search the string for a key word(s) and if it has those words output the statement. example... computer: En...
[3 replies] Last: #include <iostream> #include <string> #include <regex> int main() { ... (by JLBorges)
by jony11
Help Files
 
Write your question here. Hello Am new in programing and i have a task which is base on files,can ya plz help me out get the best program for this task ...
[1 reply] : double post, and the other one had a better answer... (by jonnin)
Problem for move and assigned code
 
I try to make move and assignment class, for understand this special member, but i have a problem: I don't hava idee how to make a better conversion #includ...
[1 reply] : Error C2679 binary '=': no operator found which takes a right-hand op... (by coder777)
Base Class Undefined
 
My compiler error is 'department' base class undefined. Very confused because all I wan't to do is just inherit. #include <iostream> #include <string>...
[2 replies] Last: If the code in Staff.h depends on definitions in Department.h, then St... (by MikeyBoy)
Finding the Average from an array
 
I'm having a small problem finding the average from an array that has been read from a text file. The text file has 20 names (first and last) along with a numbe...
[8 replies] Last: Thank you all for your help. I was initializing it but it was still gi... (by closed account jEb91hU5)
Array inputs
 
I would like to create an array that allows for me to collect a series of strings in combination with one another. Asking the user to give their pet type (do...
[4 replies] Last: #include <iostream> #include <string> #include <cctype> #include <mem... (by JLBorges)
Char Array Initialization With Hex Literals
 
Hello everyone, When I search for how to initialize a char array with hexadecimal values people say to write this unsigned char arr = {0x0a, 0x0b, 0x01,...
[3 replies] Last: Non-static members of array type cannot deduce their size from member ... (by JLBorges)
by arg57
limit while loop tries
 
in this function Id like to limit the try again to 2 tries in the while loop and then send them to the pit of misery and end program. How would I go about that?...
[6 replies] Last: It's a newer form of variable initilization and it's set to one becaus... (by fugsiqle)
1000 dice output 2-12 weird negative number
 
I wrote a program to output 2 through 12 of 1000 dice rolls and it does everything it needs to do but it is putting out a large negative number after outputting...
[3 replies] Last: Thank you for the help that was the problem! (by Flynn Rhodes)
Beginner problem
 
When i input more than 1 word, something like "1 2 3" output is 3x "Odgovor nije validan" how can i fix this? string odgovor; while (true) { cout <...
[1 reply] : Use getline( cin, odgovor ); (by lastchance)
AI learning program, kind of.
 
so let me explain how this works. This is less of a Machine learning program, and more of an evolution simulator. each neuron goes through a test, in what I hav...
[5 replies] Last: it does not matter anymore. I changed how the program works. But if ... (by Grand Master stickshift)
by cash
complex number to power
 
In my program I'm supposed to take a complex number to a power, however, my program only works when a complex number is taken to the second power and nothing be...
[1 reply] : Lets say that n==4. The x^4 can be expressed as x*x*x*x, doesn't it? ... (by keskiverto)
Search and delete an exist element in Queue
 
Hello! Now the program make: Insert 5 numbers: 5,10,15,20,25 disp: delete: 5 display: 10,15,20,25,5 How to make? Example Insert 5 numbers: cin >> ; displ...
[5 replies] Last: Thank you very much . Work like a list. Like that #include <iostre... (by Asteris)
OOP pointer
 
Hi, I have a question regarding OOP. can someone guide me how to do number 4 b, c, d? since this is my first exercise on OOP. I do not really master the subject...
[10 replies] Last: i fix my mistakes but i still dont have idea on how to do number 5 a ... (by Enoizat)
by arg57
convert if to switch
 
I have a long treasure hunt program which compiles ok but for the sake of better coding I was wondering how to convert these if statements to a switch if I can....
[2 replies] Last: Yes that works thanks salem c (by arg57)
Class not recognizing a member function..?
 
I'm following this guide: https://www.codementor.io/codementorteam/a-comprehensive-guide-to-implementation-of-singly-linked-list-using-c_plus_plus-ondlm5azr Th...
[2 replies] Last: Oh right, I always forget about that... Thank you! (by PiggiesGoSqueal)
April 2019 Pages: 1... 34567... 24
  Archived months: [mar2019] [may2019]

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