Beginners - September 2019 (Page 13)

by Bopaki
Trying to compile a program and getting an error in the Makefile.win
 
I am getting this error message: Rebuilding whole project... -------- - Project Filename: C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMnde...
[3 replies] Last: Its all sorted out now. There was a problem about the curly brackets. ... (by Bopaki)
Help with pure virtual functions/interface
 
This is a homework problem, there is much more to the code but I have shortened it down to show one specific example, but I am having the problem in all classes...
[4 replies] Last: Oh wow! Such a simple mistake! Thank you both so much for the help! ... (by Jorge626)
_Floating point exception?
 
EDIT 2: Original post was deleted, which contained code that looked something along the lines of: #include <iostream> bool isTrue; int main() { if (isTru...
[11 replies] Last: Hi guys. Just wanted to clear things up. When I first posted the origi... (by helpmesohard2)
Joined Vectors
 
I have written a function whose purpose is to join two vector strings as long as they don't go over a limit. I can't even test the function though because I am ...
[5 replies] Last: setUnion() is a method of the ArraySet class. You can't just call... (by MikeyBoy)
Sorting a Linked List
 
Hello, I am trying to sort a linked list. Following is my code.. First code is only of the sort function. Second one is the complete code. Can anyone pleas...
[2 replies] Last: bubble-sort for a linked list and you end up swapping the data... what... (by ne555)
by Ch1156
Easier way to find position of word/letter etc in string?
 
I am practicing file IO and trying to master string manipulation and the string class in general so I wrote a program that imports a list of words and sorts the...
[3 replies] Last: > trying to master string manipulation and the string class in general... (by JLBorges)
No Duplicates
 
I created two for loops to check for and remove any duplicates string in an array. I feel like the for loops are good and maybe there is something wrong with th...
[10 replies] Last: Here is a reference for std::set: http://www.cplusplus.com/reference/s... (by dhayden)
How to make a multiplictaion table using do-while loop
 
A multiplication table where you can enter an integer and enter a range. I'm new to programming and my output came out weird. Like, everything is infinite and i...
[2 replies] Last: @crispy pata, I assume that you changed your post (to include code) af... (by lastchance)
Protected value changed between setting and use
 
Hi Y'all. Another beginner question, although I'm getting into the esoterics here. As I mentioned in my post last week, I am going through Bucky Roberts's 9+ ...
[2 replies] Last: THANK YOU zapshe! That was exactly it! If you meet me on the street, ... (by jakesalomon)
by frza45
When to use pointers and references?
 
Hello! I HAVE googled this a lot. So at an intellectual level I realize: Passing/variables by value are useful because changes to the variable will not refle...
[18 replies] Last: Thanks for pointing out std::optional. I wasn't aware of it. An inter... (by dhayden)
by SPASH
expected unqualified-id before 'if'
 
I can't figure it out, am I missing curly brackets of something? #define pxWidth 32 #define pxHeight 32 #include <SFML/Graphics.hpp> #include <iostream...
[2 replies] Last: omg I'm so stupid i got it now thanks you (by SPASH)
how to separate a word from a string
 
hi hope yall are well. how would i separate each word from a string? let's say: string sentence is initialized with "This is a test string." how would i separ...
[6 replies] Last: Just because you have to print words doesn't mean you have to extract ... (by dhayden)
by Satan
Not able to declare a thread inside a for loop..
 
When I run this snippet, I get an abort from the program when it reaches the declaration of the thread inside the for-loop. for (;;) { std::thread on...
[4 replies] Last: I would suggest you do a lot of background reading first, to make sure... (by salem c)
Is printf, fprintf, or cout, etc. faster?
 
In two situations: 1. To output a single character. Which of the following is the fastest to do the job? A) putchar('*'); B) printf("%c",'*'); ...
[1 reply] : > Is printf, fprintf, or cout, etc. faster? The answer is always "it d... (by salem c)
Why isn't it good to use long bool conditionals
 
Why do people say is better to code like so: bool X = true; if(!X){//...} Rather than like so: bool X = true; if(X == false){//...}. ...
[8 replies] Last: You are thanked for your time, duthomas. Here is the reach of your gen... (by closed account 1bRGhbRD)
Initialization list with pointer
 
I want to initialize an object A in class B but I want to initialize the object as a pointer. For some reason the code doesn't call the constructor for class A....
[2 replies] Last: Thank you!!!!!!!!!!!!!!!!!!!!!!!!!! (by catsonmars)
C++ need help with recursion question
 
Hi im doing an exercise which requires recursion to change the values of vector to 3*x. I have two functions, one changes the values and another returns the vec...
[3 replies] Last: Recursion exercises like this are common, so no surprise. The trick i... (by Duthomhas)
Template Errors
 
I have an assignment (below) where I need to modify a program so that it does not allow duplicate elements. I am given 4 files to work with and I can't even beg...
[5 replies] Last: I think I got my files working. Thank you coder 777. (by stoneJax)
by xelly
Read text file with multiple variables into array
 
Hello, I am working on a Blackjack card game project where I am given a text file where each line has an integer for the value of the card and a string for the ...
[3 replies] Last: Either: - use a struct (as per @zapshe) or - put them in parallel arra... (by lastchance)
September 2019 Pages: 1... 111213
  Archived months: [aug2019] [oct2019]

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