Beginners - September 2013 (Page 59)

by haterz
Sample program SFML library
 
Im just a beginer in c++.. I find difficult to write program using SFML library.. I want to look through some program using SFML library with its source code. ...
[3 replies] Last: I side pretty much with Disch. With the caveat that it might be best ... (by andywestken)
Require the user to enter an integer
 
Part of the program I am working on requires the user to enter how many passengers will be in a carpool (2-6). The professor is obsessed with robustness. I've u...
[6 replies] Last: > How do I add a second condition, which prevents them from entering s... (by JLBorges)
Compare two strings input by the user.
 
#pragma once #include "targetver.h" #include <stdio.h> #include <tchar.h> #include <iostream> using std::cout; using std::cin; using std::endl; #i...
[6 replies] Last: I never used or use c-strings though I am a little more than a begin... (by Superdude)
by Tystuh
Help with pointing arrays (simple...)
 
In the temp array the first box represents the days and the second is the hour of the day. I need to average the total temperature for the day in the functio...
[5 replies] Last: Int k = day1 is not an int fix: // k= day 1 int k = 1 (by Gkneeus)
Help with manipulating arrays (also reading from file)
 
Hi! I am developing a neural network in C++ (prior experience in Matlab) and I am having trouble getting started with my arrays. I need to read in a 2d arra...
[1 reply] : Why do you need a 2D array? Also, please be more specific about your p... (by Josue Molina)
by BC300
Error Message for Variables for Program (1,2)
 
The test data I have for the program has listed width has a double variable, but when I try to compile and run the program, I get these 2 messages with the widt...
[21 replies] Last: and that's why http://www.cplusplus.com/forum/beginner/1988/ (by closed account 28poGNh0)
by Codeez
istream / osteam objects
 
In my book, I've come across this: istream &read(istream &is, Sales_data &item) { double price = 0; is >> item.bookNo >> item.units_sold >> price; ...
[2 replies] Last: Thanks for that. I've only used cin for input so I understand now. S... (by Codeez)
by Ch1156
Am i better off doing this...
 
Ok so in my code i use cin.clear(); cin.ignore(numeric_limits<streamsize>::max(), '\n'); pretty much everywhere there is input, i dont really have a choice so...
[1 reply] : I really don't see anything stopping you from doing that function. (by Tertius Kgatla)
use of static in variable and class
 
What does the meaning of static when we use this in front of variable or class like static int a =4; static class abc; Please brief the use of static ...
[11 replies] Last: In addition, when static is applied to a variable or function at file... (by andywestken)
looping
 
Hello, I really can't figure this out. A much needed insight is appreciated. So, I want to create a program that will ask the user to input an integer number. ...
[8 replies] Last: break wouldn't solve it, if you don't want something to appear multipl... (by manudude03)
Rvalues and constructor calls (1,2)
 
I wrote a small program to see how rvalue reference overloads (of the copy constructor and the assignment operator) can be used to prevent the unnecessary copyi...
[20 replies] Last: [quote=andywestken]Constructor called [0, init, -1, mottoA] length #2 ... (by coder777)
by rsg
I can't get it to compile (using OpenCV libraries)
 
I'm trying to run code called squares.cpp (from https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/cpp/squares.cpp?rev=4079) and it uses OpenCV, whic...
[3 replies] Last: CV_AA is a macro defined in `opercv2/core/core_c.h' To copy you may us... (by ne555)
counting
 
Hello, I am havig a problem counting certain characters ina string. What I want is to count the number of A's or a's in a string here's what I've done but it su...
[5 replies] Last: I think @giblit 's code does not work for you ,because you dont have t... (by closed account 28poGNh0)
by Noct
Help how do I declare variable correctly?
 
Also what's the difference between string and int? #include <iostream> using namespace std; int main() { int Bounty; string firstName; double rate; ...
[2 replies] Last: Noct, Start here: http://www.cplusplus.com/doc/tutorial/variables/ (by closed account z05DSL3A)
by Noct
Do I always need to put "int" when declaring a variable?
 
In c++ is it always needed to use int when declaring a variable? unlike python you just type any character and your good.
[2 replies] Last: However, there's a very interesting project lying around, which attemp... (by m4ster r0shi)
OR operator
 
How would you use an OR operator, I tried to use it | V #include <iostream> #include <Windows.h> ...
[5 replies] Last: Instead of void Main() you hace to write int main() (by vlad from moscow)
Please, I need help with the C++ libraries
 
Halp! #include <iostream> //Basic input output for interaction with user #include <Windows.h> //Might need for Sleep function #include <conio.h> #inclu...
[5 replies] Last: Changed int main worked after I compiled it a second time. Thanks (by Code Apperentice)
callback
 
please brief me the meaning of callback in C with some example
[3 replies] Last: Customizable behaviour. man atexit: NAME atexit - registe... (by keskiverto)
Event generation and sensitivity
 
i have two cases. in first i have to notify an event after completing certain task and in 2nd case i have to make the functional statements dependent on event ...
[6 replies] Last: Unless you are using threads, they do not need to wait for another eve... (by Superdude)
C String strncmp difficulty (1,2,3)
 
The following code is designed to create a simple exit condition. If the user types 'exit', the program exits. But before I get to that, I need to use strncmp t...
[50 replies] Last: Late reply Disch, part of the point I was making is that since you ... (by Disch)
September 2013 Pages: 1... 5758596061... 64
  Archived months: [aug2013] [oct2013]

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