Beginners - March 2020 (Page 7)

by jan vi
How to write to std::vector
 
For several reasons I like to try std::vector rather than std::array. The following example does not set the e_use state of all entries with value 12 to false...
[5 replies] Last: auto is just a type auto is not a type. It's a keyword that is use... (by Peter87)
Difficulty configuring library XCode
 
I'm currently trying to implement audio in a game I have been making with SDL2 using OSX XCode 10.1 I initially intended to use the SDL_mixer library, But I wo...
[3 replies] Last: I didn't see that premake page I'll give that a go... thanks! (by dangerawaits)
How To Ask User To Repeat
 
#include<iostream> using namespace std; int main() { int number; int counter=1; int fact=1; cout<<"enter number \n"; cin>>number; while(counter<=number) { fac...
[4 replies] Last: THANKS BROOOOO (by mahmoud adel)
Code help - Only returning 0 for sum and average
 
I'm creating a program with arrays and I can't figure out why my sum and average are only outputting 0. Please let me know if you find any errors! #i...
[2 replies] Last: You should also think about how you are going about getting informatio... (by Duthomhas)
by LuffyD
undefined reference to template function error
 
Im getting undefined reference error while using templates functions. I think is because im missing something on my header file. Can someone point me to the...
[2 replies] Last: Thank you, as soon as i moved everything to the header file, it worked (by LuffyD)
_Xlength_error("string too long");??
 
Hi all I have a program which will read in text files and search for specified words. Im having an error which shows up as soon as i exit the for loop in ...
[3 replies] Last: Thank you, that solved all my problems with arrays going out of bounds... (by jackster009)
Need help with implementing input validation to data structure
 
I am in a bit of a pickle here trying to see how I can implement input validation with structure data types in a function. I am trying to make it so it accepts ...
[3 replies] Last: Yeah... I was thinking those things as I wrote that version of my stri... (by Duthomhas)
by thamsa
Reading characters from a file
 
Hi I am really struggling with this question. I have tried everything but I'm failing: Write a program that will create user ids for email addresses of a com...
[7 replies] Last: Hello thamsa, I managed to get a working program that creates the fil... (by Handy Andy)
by booood
some problem about division
 
Hi, I am confusing with the problem about duplicate top divisions. If the output of the North East and South East are the same, what can I do in the code? ...
[1 reply] : you can print both, or you can print whichever you want. what do you w... (by jonnin)
by alexas
Learning the classes and object based programming
 
Hello Unfortunately I must learn the classes in the complex environment, any help is highly appreciated. I have the function in class which checks if two cubo...
[5 replies] Last: Sorry, the description is shown below. I am really sorry for such unc... (by alexas)
by flav32
Singly linked list palindrome
 
I have to check if a singly linked list forms a palindrome of characters. Each node keeps a character. I can't use a double linked list. With the code I wrote I...
[3 replies] Last: I don't care about the list as I only have to make this function work,... (by flav32)
by LoMoyi
anyone knows how to solve the following question?
 
Does anyone know how to solve the following question? Please take a look. Thank you !! Question: Modify SubtractionQuiz.cpp so that it will become a SimpleMath...
[5 replies] Last: A number that is 1, 2, or 3 digits is just another way of saying "a nu... (by dhayden)
by LoMoyi
an assignment about write a C++ program about gross pay
 
HELP!!!!!!!!! Q: The federal withholding rate and the state withholding rate are based on the following table: Gross pay Federal withhold...
[4 replies] Last: Well, I fix the problems. And it works well. But the only problem is t... (by LoMoyi)
Collect2.exe error returned 1 exit status
 
Collect2.exe error returned 1 exit status c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\D ekota\AppData\Local\Temp\cc5BFT...
[1 reply] : It looks like you forgot to tell the linker about certain libraries yo... (by salem c)
undefined refrence to
 
after compiling I'm getting errors : anyone have any ideas? ||=== Build file: "no target" in "no project" (compiler: unknown) ===| C:\Users\Dekota\Desktop...
[1 reply] : Linker error. You should tell the linker to use the SFML library. (by keskiverto)
The value isn't being changed in int main despite passing of array as pointer
 
Ok, so I am basically making a function that resizes the size of the array at run time. Please see the following code, it is working perfectly. #include ...
[2 replies] Last: Let me come up with an example (I hope it helps): #include <iostream... (by Enoizat)
by shoo11
LPSTR - LVPSTR ...
 
hey im new at c++ and i need help about LPSTR-LVPSTR Error : a value of type "LPSTR" cannot be assigned to an entity of type "char" #include <iostream> #inc...
[4 replies] Last: thanks so much (by shoo11)
while loop
 
okay this is supposed to be a super simple loop that I had put in my program as a validation but for some reason it dosent seem to work its probably something s...
[2 replies] Last: ohh okay I get it now makes sense idk why i put "or" for some reason ... (by Ripb123)
by annw3y
Vector C++
 
Create a vector in the main program that will store the dynamic objects of the Clothing class and create the function getClothesTotal (vector <Clothes *> shopp...
[4 replies] Last: double Clothing::getClothingTotal(const vector<Clothing*> &shopping) {... (by annw3y)
Meaning of this expression
 
Hi. Im trying to program for arduino. Trying to learn bit by bit. This is an example code for a keyboard input. TrellisCallback blink(keyEvent e...
[no replies]
March 2020 Pages: 1... 56789... 14
  Archived months: [feb2020] [apr2020]

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