Beginners - March 2014 (Page 59)

by ccdare
Where do temporary data be put?
 
cout << 5;//the 5 cout << "hello";// the hello int x = 5;//the "5" these data occupy memory too? Where do they be put? and how long is the life period?...
[1 reply] : Hello ccdare , I am not sure but i will try to help out. (if i got any... (by FBC)
compiler error quotes wrong line?
 
Now I'm totally confused. I posted this code in another topic earlier and got help with that problem but now I have another that seems even stranger to me. This...
[2 replies] Last: Peter87 Thanks I tried this as a default in position.cpp: Position:... (by pnguine)
Working with recursive functions
 
I am writing a program that will help us understand how recursive functions work by creating a simple dice game. But for some reason the output is wrong and I d...
[no replies]
compiler
 
Hello guys. I was writing a simple program which I have to overload the << operator so as to display the class object using cout instead of to a use a method...
[4 replies] Last: nvrmnd I didn't look closely to your comment and you didn't say it out... (by Misbahu)
by enemy
Declaring objects of the class
 
Hello! Please, we declared the objects in main: #include <iostream> using namespace std; class Rectangle { int width, height; public: ...
[5 replies] Last: Hello! This was made by codepad (online compiler). I suppose, first (... (by enemy)
by zakkor
UTF-8 string declaration
 
I understand that it's possible to declare a UTF-8 string like this: char String = u8"testãingãã"; but how is it possible to assign an UTF-8 variabl...
[1 reply] : The fact that the string is UTF-8 encoded doesn't really matter. The p... (by Peter87)
Can somebody please help "tidy up" my program?
 
Hey guys, As stated in the title, could somebody help me tidy up my program? The question for this task was: Using vectors create a program that convert...
[2 replies] Last: #include <iostream> #include <vector> #include <ctime> #include <cstd... (by JLBorges)
How i can set if Hp 0 game end
 
How i can set if Hp 0 game end #include <Windows.h> #include <iostream> #include <BluetoothAPIs.h> #include <ws2bth.h> bool Move(int xadj, int...
[no replies]
by motti
error C2102: '&' nécessite une l-value
 
Hello, I defined the function getDataFile() in order to keep the content of a file in a variable QString like this: QString getDataFile(QString in_...
[no replies]
by Alby94
Rvalue - Lvalue
 
Why this is true: void f (const int& x) {std::cout << " ";} void f (int&& x) {std::cout << " ";} template <class T> void func (T&& x) { f (x); ...
[1 reply] : You have to use std::forward in second case to pass a. In previous ver... (by MatthewRock)
Guessing game
 
I have a problem with my guessing game. The problem which my compiler says is the following one: error: 'else' without a previous 'if' I know what that mea...
[6 replies] Last: On the topic of the goto s, they really do make your code harder to u... (by TwilightSpectre)
by Legato
Noob Problem
 
Hi, Ive been following along with a tutorial i found on the web, but this has got me really confused, I know it's probably something really easy, but its ...
[5 replies] Last: Woohoo!! it works! Are header files usually just the function protot... (by Legato)
Modularize a program into four functions
 
Write a simple calculator program that allows input of two integer operands and outputs the result of all five arithmetic operations (+, -, *, / , & %). Mod...
[3 replies] Last: > I could do this in two functions but I have to use at least four M... (by JLBorges)
key pressed
 
i have no idea about hte part where it says "if GetAsyncKeyState(vkey)" this is what some guy gave me i need it to be able to read if any key is being pressed ...
[2 replies] Last: #include <conio.h> #include <windows.h> #define _VK_P 0x50 void _clrs... (by SorinAlex)
Storing Class object in a array
 
Please take a look at the following: dispenserType type ; dispenserType appleJuice(); type = appleJuice; dispenserType orangeJuice(); type ...
[1 reply] : That behavior leads me to think that appleJuice and type are two sepa... (by kbw)
tellg tellp seekp seekg
 
Can someone explain to me in simple details and stuff what are tellg tellp seekp seekg for??? :D Thanks, Very Appreciated :)
[1 reply] : When processing a stream that's capable of reading and writing (put an... (by kbw)
Undefined reference for included class
 
I am writing some C++ implementations which work if I inline all the functions into one file, but I would like to "graduate" to using includes. I have followed ...
[2 replies] Last: That is the answer thank you! (by barnhillec)
help
 
i have to made a class of large integer. that is capable of storing and manipulating integers so big that they cannot be stored in the normal 32 or 64 bit stora...
[no replies]
Copying Arrays
 
I am trying to copy the values from array 2 to array 1 however when I compile I get the error "string subscript out of range". From what I understand this mea...
[4 replies] Last: Thanks so much i just appended it like you said. (by nickmiller24)
Class and vecors, writing CD collection program
 
I'm writing a code that keeps track of a CD collection, however I've run into some issues with my coding. I am getting errors that "left of the ' ' must have a ...
[3 replies] Last: Something I noticed while I was skimming. On line 92, you are calling ... (by xismn)
March 2014 Pages: 1... 5758596061... 79
  Archived months: [feb2014] [apr2014]

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