Beginners - November 2014 (Page 12)

files
 
Hey, so I have to read in a file and I think I'm doing everything right but when i go to debug it only a black screen appears and when i exit the black screen a...
[no replies]
Timer is too fast
 
I need help with this code I've been working on, I am a beginner to c++ and using xcode for my programs. The countdown on this clock treats the hours like minut...
[no replies]
"Too few arguments to function" question
 
Hey there peoples. Got a hopefully quick and easy question for ya. Having an issue with this code. Im getting the error "In function `int main()': too few argum...
[4 replies] Last: Oh wow thanks so much for that. Sorry such a dumb question. (by JackHawk)
Comma Delimited Number from Array
 
Need some help trying to write a way to properly format numbers by adding "," to numbers. Ex: 1000000 -> 1,000,000 30000000000000 -> 30,000,000,000,000 In...
[4 replies] Last: You could at least go with my suggestion to use std::string to conta... (by LB)
C++ to PDL conversion
 
Hi guys, for part of my second uni assignment I've had to write a fairly simple cpp program, which I have now finished, the problem is I also have to provide th...
[1 reply] : As this is a C++ forum, I'm not sure what kind of help you're expectin... (by LB)
Problem erasing a vector elements
 
Hello everyone, i'm having a problem erasing a vector element. The error i get is the following: "no match for 'operator+' in '((CStudent*)this)->CStudent:...
[17 replies] Last: yup, you're right (by Amiplus)
Dynamic 2D array; program crashes after input
 
Hi. First time user here. I'm practicing using dynamic 2D arrays. I'm also using classes, so the matrix is a member of the class. I have code to allocate memory...
[2 replies] Last: Thanks coder777. That was a silly mistake on my part. It works now. (by imStillPondering)
Tictactoe10000
 
Here ís my tictactoe so far: #include <iostream> #include <matrix.h> namespace tictactoe { constexpr char NOUGHT = 'O' ; constexpr char CROS...
[8 replies] Last: What is Matrix<Player,2> at line 5? What is a.3 supposed to do at ... (by dhayden)
Executable creation time w/o windows
 
I have been looking for a way to control time elapsed since creation (installation) and current time. I plan to use this for a simple licence check. I have fou...
[1 reply] : Is there a way to get the file creation time of the current executabl... (by MiiNiPaa)
Problem while using stoi fuction.
 
When I run the following program it shows an error error: call of overloaded ‘stoi(int&)’ is ambiguous Why? #include <iostream> #include <string...
[2 replies] Last: The stoi function takes a string as its first parameter; you're passin... (by TheKingOfTyrants)
Placing element of string into vector
 
I am not sure why I am getting an error for this: void create_list(const string & str_text, vector<char> & vec_text) { for (int i = 0; i < str_te...
[3 replies] Last: Yep that was the problem Thank you (by bgold12)
Problem with counting
 
Hi, I have this kind of problem: My input looks like this: 2 w 3 4 d 4 5 And after end of first iteration for i=0 i get s=4.12311 but!! if i change th...
[no replies]
Arrray/loops
 
I have compiled this code, it compiles and runs, but it runs a blank program. Im not sure what could cause this. #include <cstdlib> #include <iostream...
[3 replies] Last: Thanks! Missed that typo! (by melgunn6)
Adding currency symbol before the output of a floating point variable?
 
Hi all, brand new here. I'm just finishing up my second project for uni, and have managed to hit a brick wall whilst trying to add the £ sign before variableSh...
[3 replies] Last: If you want more than one statement to be part of an if or else you ne... (by Peter87)
missing codes
 
what em I missing? #include <iostream> using namespace std; int main () { Int tol = 0, indx = 1; while (indx <= 30) { tol += indx; ++indx: return 0; ...
[4 replies] Last: It isn't outputting anything. Add cout << tol << '\n'; at line 16.... (by dhayden)
HELP! opening files
 
Hey, so I have to write code to open these files and do further stuff to them but I can't even get the main file to open/read in. I have the files open under re...
[no replies]
Help with std::map
 
Hi, everyone. I need your help... I wanted to fill an std::map with some value_type arguments. When I run my code, the following error occured. Can anyone tell ...
[7 replies] Last: Yes, you're right. Thank you!!! (by Xuan Liu)
by Ganado
Dereferencing a function pointer
 
I'm exploring function pointers as I think it will be a good way to do some curve parameterization stuff. Given the following code, double func(int a, char c)...
[6 replies] Last: Okay. So basically even though the language gives you the ability to d... (by Ganado)
Circle Area & Circumference, please help?
 
So I have been working on this project for the last few days and have it running except when it returns the radius entered and the circumference and area they a...
[5 replies] Last: Thanks for all the help! I got it running! :) @Gaminic you were most ... (by jayfloyd)
[C Primer Plus 5th Edition] vs [C Primer Plus 6th Edition]
 
[C Primer Plus 5th Edition] vs [C Primer Plus 6th Edition] I am currently ready [C Primer Plus 5th Edition] and i recently bought it, as suggested by many fr...
[9 replies] Last: @Grey Wolf Thank you very very Much. (by Subscriber360)
November 2014 Pages: 1... 1011121314... 65
  Archived months: [oct2014] [dec2014]

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