Beginners - September 2017 (Page 4)

std::list and iterator
 
how do you return a value using std::list and iterator here an example include "example.h" ...
[6 replies] Last: What would you return instead of "return exampleOne include "exam... (by coder777)
by Demii
Counting correct answers from 2 arrays
 
Hi, i'm writing a program that will grade quizzes from a fixed array of correct answers, it compares...
[3 replies] Last: I would do something like sum+=arrayname Beware of mixing apples an... (by Chervil)
swapping bytes in c
 
I am trying to swap bytes in c. I am suppose to swap the nth byte and the mth byte. I am given exa...
[7 replies] Last: It's not the "human readable form", it's the actual value stored in th... (by helios)
Need help with tranferring array to other array
 
I don't quite get what to do with the TO DO: parts of the code, how would I copy an array to new arr...
[3 replies] Last: yes and no. yes, that is the correct syntax. No, you cannot just re-... (by jonnin)
Need help with array
 
If i have a number of numbers in the array 0) and I declare pointer 1) and I allocate dynamic memory...
[1 reply] : this leaks memory. the memory allocated on step 2 is inaccessible af... (by jonnin)
by chuvak
DO WHILE loop not behaving as expected
 
Hi forum, code is below. Everything seems to work as expected, but as soon as sin goes out of t...
[4 replies] Last: Hi, I would make some other changes too: I don't like the use of the... (by TheIdeasMan)
error: exited with non-zero status
 
i keep getting this error on my code and i can't figure out why. can someone please explain? if the...
[1 reply] : Hi, I ran the code and had no output but normal termination (returned... (by TheIdeasMan)
C++ for loop infinite
 
Hello all.. I am currently stuck on this for loop.. When ran, it keeps going and I need to stop.. T...
[3 replies] Last: Usually, identifiers in ALL_CAPS are reserved for macros. Because ma... (by mbozzi)
by Demii
Looping through and comparing two string arrays
 
Hi, I'm having trouble with a section of my code where i'm asked to loop through two string arrays...
[6 replies] Last: Thank you for that example, that clears a lot up for me, I don't know ... (by Demii)
If and Else How to write more efficient
 
How would I write this code more efficiently with If and Else? #include <iostream> using namesp...
[3 replies] Last: This is not a "with If and Else" solution: int convert2clamp( int mar... (by keskiverto)
Need Help on Polynomial Programming assignment
 
This is the first assignment for my CSIT 121 class and I am completely lost. The assignment is a ...
[2 replies] Last: Plus, that PDF is behind a login wall :) (by Repeater)
End keys in c++
 
although my code doesn't accept end keys like "Home,End,Del,INS"...when i input end keys such as "Ho...
[1 reply] : See documentation for getch() https://docs.microsoft.com/en-gb/cpp/c-r... (by Chervil)
why it gives me character eventhough getch() will return integer
 
Write your question here. #include<iostream> #include<cstring> #include<conio.h> using name...
[2 replies] Last: crystal clear...thanks repeater...you make my day (by phongvants123)
Error with OOP inheritence
 
Hy, I was reviewing OOP and got stuck on this exercise, but can't figure out what I did wrong... ...
[5 replies] Last: Funny, I did it in Visual studio, restarted it and now it worked. Than... (by spartannn)
Why do these two consecutive loops cause a segfault?
 
Why do these two consecutive for loops cause a segfault but one works fine on its own and both funct...
[8 replies] Last: Just my 2 cents worth, but I think it's an important convention: IMO ... (by TheIdeasMan)
T' illegal use of this type as an expression
 
i want to check that the typename for a vector_set v is equal to class vector_set<int> class ve...
[1 reply] : #include <boost/mpl/list.hpp> #include <boost/mpl/contains.hpp> usin... (by JLBorges)
Euler Method for DNA assembly
 
New to C++. I have absolutely no background in coding/programming but, at the suggestion of my PI, I...
[14 replies] Last: @Duthomhas no offense taken. I know a bit of R but, unfortunately, the... (by brownie206)
How can I read in an array of C-Strings from a text file?
 
For example, if I have: {camera lidar radar} from a text file and I wish to read from the text fil...
[1 reply] : You need something that can find that text in the file. That means the... (by Duthomhas)
by Irhcsa
Pathing issue
 
So half of this works. When I type paint, it opens paint. I'm trying to get google chrome to open. I...
[3 replies] Last: Thanks guys! (by Irhcsa)
error problems
 
im writing a function that will calculate the length of a players first and last name then swapping ...
[1 reply] : What is the type of player ? You do set it on line 1. Does type Pla... (by keskiverto)
September 2017 Pages: 123456... 21
  Archived months: [aug2017]

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