Beginners - May 2016 (Page 9)

cin<<x doesn't show up
 
Hello I am new to c++ and I am learning online tutorial, I have very simple code I want to show the result in the console.. I used online ideone.com it will gav...
[4 replies] Last: > cin.get (); [quote=Douas]your IDE is too stupid to know that a con... (by ne555)
object as parameter error
 
Hi guys I thought I did everything right here when passing an object as parameters but for some reason I'm getting an error on line 21 saying 'passObject' was ...
[6 replies] Last: Thanks for clearing up that problem =) (by adam2016)
SDL collisions
 
Hello! I have been working on collisions for my 2D game in SDL and I cannot get them to work smoothly. My collisions left and right are very smooth but when eve...
[15 replies] Last: Wow that's interesting hahaha. I assume you would like Peter87's sugge... (by davidemoeller)
by opengl
io_service.run with multithread
 
I have learned the example here http://www.boost.org/doc/libs/1_61_0/doc/html/boost_asio/example/cpp03/chat/chat_client.cpp I want to make it support multit...
[3 replies] Last: [quote=opengl]1 for httpserver2,how does it assign a io_service to a C... (by Cubbi)
why do I get an exception with Null pointer?
 
Hi guys I'm just curious as to why if I pass a the variable z by ref which points to NULL to my function I get an exception, why does this occur? Thanks ...
[2 replies] Last: thanks (by adam2016)
Segmentation fault error
 
Hello everyone I am having an odd problem, I currently finished a programming challenge from coderbyte. I used visual studio for testing and writing my code and...
[2 replies] Last: Yeah that was the other issued since pop_back correct me if I am wrong... (by gutty333)
difference between these ways
 
Hi guys I'm wondering whats the differences between these pieces of code in one I'm using the * to pass by ref a and in the other I'm using & to pass by ref yet...
[1 reply] : they both do the same , pass by reference and pointer , as you can se... (by Ericool)
Vector push_back/pop_bakc do not work
 
In my code I use a vector of arrays. In my function I have to use push_back and pop_back . If I use my code I get an error message: vector iterator + offset...
[4 replies] Last: As soon as zeile is 0 you must not execute line 53/54. (by coder777)
Multi-dimensional vector of arrays
 
I'm trying to store the inforamtions of a point in a vector. So I got three coordinates for each point. To store the information I would like to use two vectors...
[6 replies] Last: Ok, so you can do whatever you want - but I would seriously suggest yo... (by TheIdeasMan)
by crepe6
Printing message with only 40 characters per line.
 
hi i'm trying to write a function that prints a message over one or more lines, so no line can have more than 40 characters. I did try using a for loop so if...
[1 reply] : void printMessage () { string message (120, 'A'); int CharsPerLi... (by Thomas1965)
Table comparing celcius and fahrenheit. Keep getting error
 
I'm trying to write a program that shows a table of the Celsius temperatures from 0 to 10, and the Fahrenheit equivalents right below. I used F = 9/5 * celcius ...
[10 replies] Last: @TheIdeasMan: Good catch. @Mike: you might also want to make your ou... (by Arslan7041)
Sorting points to form contoure
 
In my software I get the coordinates of points of a contour stored in a vector matrix . This vector consist of n rows and three columns (xyz). So now I want to...
[2 replies] Last: Hi, Google "Delaunay Triangulation", there are some sites with explan... (by TheIdeasMan)
2d guess game..
 
Hello, so basically I have to create game where you have to find number in pair's in 2d, only problem is, I don't know where to start. The game should look som...
[2 replies] Last: A modification of what the above poster said: You should make a funct... (by Arslan7041)
Calander Help
 
Hello, I can't seem to fix this part of the program. I am trying to fix it so that when the output comes out, the name of the month, for example "may" or "june"...
[no replies]
by Tonlee
A question about std::move
 
Why the b is 3 after I move it? I think it is an uncertain value. int main() { int a = 2, b = 3; a = std::move(b); cout << b; system("pause"); ...
[4 replies] Last: Not necessarily undefined behaviour, even for types that are not triv... (by cire)
content
 
content
[1 reply] : cout << fixed << setprecision(2) << .8 << "\n"; Hope this helps.... (by Duthomhas)
array as parameters
 
hi guys I'm just wondering why this code won't work I get an error when I try to pass in an array,I set the parameters to take an array yet I get an error I'm n...
[6 replies] Last: yeah I realized that lol I think I'm going to call it a day today (by adam2016)
by USAHAL
Phonebook trouble
 
Hello, I am a very big beginner and I am trying to make a phonebook that can add many entries, search through all the entries, and print all of the entries out....
[2 replies] Last: // PBachmann's help to USAHAL // Phonebook // 21 May 2016 #include <... (by PBachmann)
very simple program crashes
 
Hi guys,I'm just wondering why my program crashes and gets a runtime error,I get no compiler messages and the program builds and runs it says program terminate ...
[2 replies] Last: that makes sense =) thanks (by adam2016)
Perfect numbers calculator seems to freeze after some time
 
Hello everyone, I'm new here as well as in C++ and programming in general. I have a program which finds perfect number from 1 up to the number I give it. It fin...
[no replies]
May 2016 Pages: 1... 7891011... 36
  Archived months: [apr2016] [jun2016]

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