Beginners - August 2014 (Page 10)

Calling Functions
 
Hi. I'm not sure how to call displayUsersChoice properly inside main. Thanks! #include <iostream> #include <string> using namespace std; class C...
[3 replies] Last: It's not calculating properly You should explain what you mean by th... (by Ganado)
What is the difference .....
 
between string let = ""; and string let; or both are wrong?
[2 replies] Last: Thank you Sir. :) (by iamnoob15)
quadratic equation help
 
I'm learning about pass by reference and I'm trying to write a code to solve a quadratic equation roots. It's giving me errors saying I cannot use 4.0*a inside ...
[13 replies] Last: Let me suggest that you have qroot() return a bool that indicates wh... (by dhayden)
by h4ever
access to std::string element
 
I am trying to parse args. void CLParser::ParseArgs(int argc, char* argv ){ std::string arg; for (std::vector<std::string>::iterator it = raw_args.begi...
[3 replies] Last: Corrected, thanks if (i == 2 && (*it) != '-' ) (by h4ever)
expected type specifier
 
I have this line of my code .. vector <Team *> teams(4); visual C++ compiler says "expected type specifier" when i hover the cursor over 4 in teams(4) ....
[4 replies] Last: Thanks. it works (by shadowCODE)
factorial logic question
 
So I wrote a code to calculate the factorial of an int value, but when I checked online the code I made was a bit different then most of the codes I found. I ju...
[2 replies] Last: [quote=Homberto]the code works for me. Uggh...did you even read the O... (by giblit)
Array question
 
I just started reading about Arrays and I'm a bit confused about the "i" part of it. So i starts at 0(lowest value of an array?.) So it will keep adding 1 to i,...
[4 replies] Last: Thanks for the detailed reply. The resource I'm studying taught arrays... (by hellworld136)
Speed up C++ code
 
I have a 243 gigabyte text file that I'm trying to break up into smaller pieces. Specifically, it's a textfile with a lot of numbers in it. I want to break the ...
[4 replies] Last: Was it because I neglected to reopen values2? Yes. (by Chervil)
how long does it take for you to finish a c++ book
 
how long does it take for you to learn a c++ book ? everyday i read about people who finish an over 1000 pages c++ book in 2 months or less....i'm a beginner an...
[1 reply] : It honestly is not about how fast you go. Just learn the material one ... (by Edwards)
sieve of eratosthenes seems slow
 
I think this function works as a sieve but it seems quite slow. Can someone suggest how I can make it faster? Thanks! std::vector <bool> primes (MAX); /...
[1 reply] : 1) Construct the vector with the value you want, rather than iteratin... (by Disch)
SFML Mouse event
 
#include <iostream> #include <SFML/Graphics.hpp> using namespace std; void helper(sf::RenderWindow& window) { while(window.isOpen()) { sf::Event fEvent; ...
[6 replies] Last: omg what a stupid mistake by me. thank you so much. i couldnt find thi... (by unstoppy)
Having trouble understanding libraries and API.
 
What is the difference between a library and an API. I've heard some people say that the API is the interface for the library, but it doesn't really make sense....
[5 replies] Last: So, if I understand correctly, OpenGL is used for making graphics do t... (by TheToaster)
Problem in saving results in a text file
 
Hello, I have a problem with saving the result of this function: y= 2*Sin(x) – x^2 Cos(x) in order to draw its diagram in excel. I want to save the res...
[4 replies] Last: Hey Gingi, i appreciate your idea to closing the file. file.close() ... (by shadowCODE)
C Programming- "Expected Expression Before % Token"
 
So I was trying to code a simple number guess game. I've done it in C++, so I decided to try it in C. However, on line 24 (scanf("%i,&reply)), my IDE (Code::Blo...
[2 replies] Last: Also, a switch() statement would be more appropriate here than the r... (by dhayden)
While loop question
 
I'm trying to make this code take a number(14) and a guess(3) and keep solving the problem until the answer is equal to the last. For example, 14/3=4.666 ...
[4 replies] Last: Thanks for the help. I got it working now, if there was a better way o... (by hellworld136)
Linked list
 
I made this programme that adds some numbers to the list and then shows but i m not getting this to work .... input part goes right but when it comes to dis...
[2 replies] Last: Thanks bro i realized the problem and it's now working .... so foolish... (by MRKSalman0349)
by h4ever
error C2039: 'IsDirectory' : is not a member of 'FILE_'
 
I need help with this: class FILE_ { public: FILE_(); static int GetEncoderClsid( const WCHAR* format, CLSID* pClsid); static int find...
[2 replies] Last: Thanks. (by h4ever)
Hi I'm new here:)
 
What's wrong with my codes? :( #include <iostream> using namespace std; int main() { char let; char d; cout<<"What do you want? Letter or Number"<<...
[2 replies] Last: Thank you so much Sir! :D (by iamnoob15)
by it058
pointer to constant
 
There is a pointer to a constant value. why "&" need to be used to get address of that constant ? #include<iostream.h> #include<conio.h> void main() { const in...
[6 replies] Last: As per your instructions : my code #include<iostream> #include<conio>... (by it058)
wHILE LOOP
 
Hi Guys, Can you teach me on how to do a Program that has a while loop and its about Factorial. Like number 1-10, then, if its 1=1x1 2=1x2 3=1x2x3 and so on and...
[6 replies] Last: can u post exactly what you would like the read out to look like. (by kmtompkins)
August 2014 Pages: 1... 89101112... 40
  Archived months: [jul2014] [sep2014]

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