Beginners - March 2015 (Page 11)

c++ timers
 
Is this a good way to use timers in c++ for all platforms? or is there a better alternative, I ask this because I'm trying to find an accurate and cross platfor...
[2 replies] Last: Thank you for your reply that helped allot concerning the use of time ... (by TuiCall)
Question on classes
 
I have a hw assignment asking me to create a class that will have 4 private member variables. These will be an integer representing the product’s unique ID co...
[5 replies] Last: pass my_product argument as a reference,that should solve your problem... (by TuiCall)
by gelier
GUESSING GAME ! no duplicate guess, how ???
 
It's hard to explain without example, please check the code then the question is on the bottom, thank you. gameNumber receives a random number from the main. ...
[3 replies] Last: int prev = 0; prev = gameNumber; if ( prev == gameNumber); std::cout ... (by xenovia12)
functions
 
I don't really have a code. Functions confuse me and I need help figuring out how to write the function for the following program: Write three independent fun...
[5 replies] Last: theres a lot of tutorials in google, you wont be able to answer that i... (by xenovia12)
C++ tutorial
 
Hey guys, i am a beginner at c++, but i am very interested to learn it and be a pro. I found a tutorial on yt ( https://www.youtube.com/watch?v=tvC1WCdV1XU&list...
[10 replies] Last: @jackint send me your skype name, we have a c++ group (by xenovia12)
Object and variable not declared in scope
 
Hi all I'm brand new to C++ and am having a few problems with my basic understanding of how scoping works. I've done searches and am going through the tutoria...
[3 replies] Last: void playerIntro() { string inputName; printf("Please enter ... (by xenovia12)
File IO, Fahrenheit conversion
 
"Write a program which reads stream of Fahrenheit from a file and writes the corresponding Celsius to another file. User should be prompted for input and output...
[1 reply] : change line 9 to ifstream input_file("fahrenheit.txt"); change line... (by TuiCall)
Putting numbers in sequence
 
hi, I've been trying to get this to work now for 4 hours. I've tried all sorts but it just will not work. my original code that I wrote was simpler but it would...
[6 replies] Last: int foo; int bar = 42; // is it possible that foo==bar? Yes, because... (by keskiverto)
Help
 
Hi guys I need help with this code.. I need it to move it from left to right infinitely. this is my project/exam and my partner just bailed on me on the passing...
[3 replies] Last: @fg109 Thank you very much for replying. and thank you for giving me a... (by Skippy123)
help2
 
Hi guys. I need help I have a code that uses asks for the users input for the map size and asks for the number of missiles or tries. the program should display ...
[2 replies] Last: Oh sorry for not specifying I just want some pointers on how to make g... (by Skippy123)
Seg fault on overload << operator
 
I'm writing a simple Cell class for a sudoku game, and my overloaded extraction operator is giving me a segmentation fault whenever I use it. Was hoping someon...
[4 replies] Last: OP's been around a year and a half so should know better. (by norm b)
by ifangy
Binary Search For Private Array of Pointers
 
The binarysearch function does not work, because the datatypes are incompatible. (no conversion from char* to int). I'm wondering what I can do to make this bin...
[2 replies] Last: void binarysearch(char *name2, int &index) { int low = 0; int high =... (by ifangy)
by nemimi
Array & Functions for Student Gradebook
 
I realize I have a few problems with my code, but my main problem is in line 23. I want to say, "If the user inputs anything but "KEY", run this code". The co...
[5 replies] Last: OK, I'll try to explain the problems in more detail. On line 10, you ... (by fg109)
by oseri
Cant understand this syntax
 
What does the last line actually do ? Is this syntax valid for unique_ptr only ? std::unique_ptr<T > _buffer(new T ); int _size(16); _buffer = _...
[3 replies] Last: I've copied this line directly from the article about c++11 features h... (by oseri)
Help reading csv file
 
Hello, so I'm trying to read in a csv file but running into a lot of errors bugs. The file format (obviously) is something like 1.4, 3.4, 6.7, 4.3, , 7.6 T...
[2 replies] Last: I'd sorted this out anyway but that's what I did. Cheers =D (by Greenfractallines)
Outputting characters from one file to another
 
Hello, I am writing a code that searches through a text file for the word 'ricin.' I need to create he cod so that if this word is found, the code will outpu...
[4 replies] Last: Oh, yes, that too. Think about the result of the condition on line 33.... (by keskiverto)
Program is skipping cin.getline in loop?
 
...
[5 replies] Last: Thanks, and noted for myself. I retract my suggestion. (by mgoetschius)
convert integers to Roman Numerals assignment
 
I'm working on an assignment for my first semester of c++ at uni. I've Been working on a program that acts as a form of Roman numeral calculator, I input Roman ...
[9 replies] Last: Glad you have it finished. As for your question, I'm sure someone sli... (by mgoetschius)
What's wrong with the following arithmetic operation?
 
I'm just trying to do a simple arithmetic operation but it returns me the 0 value. Here's the code: main(){ long Population_A, Population_B; ci...
[3 replies] Last: Thanks to all, it helped. (by JoseMiguelCab)
by koopey
adding address of previous element in linked list?
 
Hi there. In a list I create, I want to add a pointer to both the next element and the previous element. I did part with pointer to next element. But pointer to...
[3 replies] Last: It's fixed. Thanks guys! (by koopey)
March 2015 Pages: 1... 910111213... 51
  Archived months: [feb2015] [apr2015]

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