Beginners - March 2019 (Page 4)

practice
 
yo gimmie some code to mess around with im bored and i want to learn something. I use visual studio so let me know if ur code requires a pack from the VS insta...
[3 replies] Last: Hello HueMungus, Sorry about that. I pasted the wrong link and did no... (by Handy Andy)
Calling a virtual function in main
 
Hi, I'm trying to call 2 virtual functions inside my main, and I'm calling them the same way I've been calling regular class functions... ExampleClass ran...
[1 reply] : I'll leave this up in case anyone has this issue. Only declare your ... (by jjordan33)
by daveed
How to implement istream& operator
 
From this code, I am pretty sure I am supposed to create an array of books with the istream& operator method. However, I am not sure how to do this. I just nee...
[1 reply] : Hello daveed, This is similar to http://www.cplusplus.com/forum/begin... (by Handy Andy)
Dynamic String in array
 
So I have to input a sentence from the user. Each word should be stored in a 2d array whose columns vary in size and each row stores one word as a null-terminat...
[19 replies] Last: Very nice, I never had to use realloc before. (by Ganado)
by daveed
istream& operator ostream& operator help
 
I am trying to call the operator << from the Book program to implement the operator >> in the Warehouse program. However, I am confused to how I am supposed to ...
[3 replies] Last: First, how many threads do you need on one topic? Earlier threads: htt... (by keskiverto)
random numbers
 
Hello, I wrote a recursive function and I don't know if it is the cause that the random naumers seems don't work. That is to say it works one time but as they a...
[1 reply] : Hello psosmol, Line 13 is being done every time you enter the functio... (by Handy Andy)
error expected primary-expression before ')' token
 
This is the beginning of my code. I am rebuilding as I go along. I am stuck getting the error "error expected primary-expression before ')' token". This error o...
[4 replies] Last: [quote=ames1951]I am still encountering an error though?? That is a n... (by lastchance)
Switch Statements; CASES BEGIN WITH SAME LETTER?
 
Hi! In this program, I am using switch statements in order to execute commands from a made up language. However, I cannot seem to get my program to distinguish ...
[9 replies] Last: Quite. If this were a course in teaching people to run marathons, the... (by salem c)
by Alb13G
Mult and Add loop function problem
 
I'm having a problem with the addition function. I used product as the accumulator, I'm not sure if I should have. I cant figure how to configure the for loop h...
[8 replies] Last: If you do look at my earlier post, you should notice that multiplier ... (by keskiverto)
by daveed
Help implement this Class Please
 
[/#ifndef BOOK_H #define BOOK_H #include <iostream> #include <string> using namespace std; class Book { /** * @param is the input stream * @param book th...
[5 replies] Last: Edit your posts to put in code tags as I mentioned, then people will r... (by salem c)
Write to the end of .csv file (1,2,3)
 
I have a .csv file like this No,Student ID,Last name,First name,Gender,DoB 1,18127221,Nguyen Van,Tuan,Male,4/11/2000 2,18127222,Tran Van,A,Female,9/6/20...
[42 replies] Last: By the way, I have a outside-question. Did you start your work by work... (by thinhphucvang)
by gjur99
help with arrays problem
 
Im fairly new in the programming world, and I picked up a problem recently of which I've been struggling with, a lot! This was the starter code. My question is...
[1 reply] : Hello gjur99, On line 12 you write string types[ NUM_TYPES ] . But w... (by Handy Andy)
Void pointers
 
Looking for pointers on how to solve this question. Exercise 11 Write the definition of a function that takes as input a char value, and returns true if the...
[3 replies] Last: ok took some work and thanks to both of yall and some modifications I ... (by blackstar)
I have no clue whats wrong
 
I am getting these errors why? Severity Code Description Project File Line Suppression State Error C2679 binary '>>': no operator found which takes a right...
[1 reply] : If that is indeed your source code without any changes Visual Studio 2... (by George P)
Preprocessing a file to remove all \n or endline characters from file and print results to new file
 
The following code removes the endline character from all lines of the doc_word_test.txt file and prints correctly to the screen (or command prompt). However, o...
[3 replies] Last: Thanks a bunch...this worked. :=)) (by sunshine4)
Results from one function transferred to another
 
I am having trouble figuring out how to transfer the results from "menu2()" and using that information in "Sell_coffee()." Some comments were made from previous...
[3 replies] Last: I forgot to change the condition for the while loop! Again, the while ... (by zapshe)
Exception thrown: read access violation. Doubly linked list
 
I'm getting this error. I don't understand why temp->next is nullptr if temp=head. Exception thrown: read access violation. temp->**next** was nullptr. occu...
[6 replies] Last: Some more comments: When coding a linked list with a tail pointer, you... (by dhayden)
Using a main function to print sum of two values?
 
The comments in the code indicates what I am trying to do, however this is all I am able to come up with. But from here I am stuck. Is there a way to make this ...
[7 replies] Last: Hello CodingIsHard17, This is all that I am able to come up with but... (by Handy Andy)
[Problem] Char pointer
 
Dear C++ community I came across some code I needed to give the exact output of ( but did not understand what the "foo" functon does - why multiply i by 11 a...
[2 replies] Last: Thank you, I really appreciate your help. (by NovaPrimeveera)
asd
 
/lsdfadsf
[2 replies] Last: to compare ignoring case, use a toupper or tolower on all input agains... (by jonnin)
March 2019 Pages: 123456... 25
  Archived months: [feb2019] [apr2019]

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