
please wait
by mehak
returning references
|
if i omit the static keyword,the output changes,but y? #include<iostream> using namespace std; int &fun() { static int x = 10; return x; ... |
Aug 18, 2014 at 2:41am
[1 reply] : Read this: http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-... (by Smac89)
|
by gamerguy314
Random Access File
|
Hi, I'm having trouble pulling information from the stream when trying to copy a string with spaces in it. For example, trying to copy "Jigsaw Puzzle" to my va... |
Aug 18, 2014 at 2:27am
[2 replies] Last: Thanks! It works after i also used cin.ignore(25,'\n') because I'm s... (by gamerguy314)
|
by Al Biruni
Linking seperate functions to the main program
|
I want to link a function which is separated from the main .cpp file. Like I want to call the function from the main.cpp file. How can I do that? I see in l... |
Aug 18, 2014 at 12:25am
[10 replies] Last: Yeah! :D Now I have got it :) Thanks vxk and keskiverto for your time ... (by Al Biruni)
|
by bennyone
why do we need a virtuaal destructor
|
given the coDe class A{ public A(); ~A(); } class B: public A public: B(); virtual ~B() why do we need a virutal destructor? , i think tha... |
Aug 17, 2014 at 8:14pm
[3 replies] Last: if it is virtual a dtor will not be called? If you are calling a n... (by Disch)
|
by abdalimran
Unable to write a condition using code
|
I am solving a problem where I've to give an if-else condition. I will ask user to input a number. And the condition is the number size will not be more tha... |
Aug 17, 2014 at 7:55pm
[2 replies] Last: Please read the tutorial on this site, this question could save everyo... (by Krisando)
|
by pilotnate
using exceptions to check if entry was valid
|
So im writing a program that converts a seven digit phone number to all the possible words that correspond. In error checking, it rejects (and has the user typ... |
Aug 17, 2014 at 7:15pm
[8 replies] Last: Very good advice. Thanks! (by pilotnate)
|
by Dexter 3202
how to merge and order arrays
|
Hi!I'm a beginner and I'm trying to make a program that merges and sorts arrays and this is what I got so far #include <iostream> using namespace std; ... |
Aug 17, 2014 at 5:53pm
[9 replies] Last: But that does not concatenate. @Dexter You try to sort arra. You hav... (by keskiverto)
|
by vxk
const confusion
|
I have 2 questions regarding the following code 1-> why can't i call the increment function inside the inspect function by writing : counter::increment()... |
Aug 17, 2014 at 5:34pm
[8 replies] Last: volatile is very seldom used. AFAIK the only time it's useful is for ... (by Disch)
|
by vxk
difference b/w data structures
|
Is there any difference b/w a table and a map or are they completely same ? Thanks |
Aug 17, 2014 at 4:26pm
[5 replies] Last: The C++ standard has std::map and std::unordered_map. Whether they ar... (by keskiverto)
|
by comebackkid
How to check whether element of vector is same?
|
How to check if a container of a vector have same element? for example: a vector is contained with employee and task. i want to sort all the task by the name o... |
Aug 17, 2014 at 3:34pm
[2 replies] Last: thanks man. (by comebackkid)
|
by r 4 raja
How this program executed? Pls Explain..
|
Write your question here. #include<iostream.h> #include<conio.h> #include<string.h> class strings { char s ; public: strings() { s ='\0'; } strings(char *c) { ... |
Aug 17, 2014 at 1:55pm
[3 replies] Last: Line 7 - decide how large you want the array to be and declare it acco... (by Chervil)
|
by abdalimran
Result: runtime error (SIGSEGV)
|
I've written the following code to count average. In my PC program works fine. But when I submit it into OJ, it shows Result: runtime error (SIGSEGV) What ... |
Aug 17, 2014 at 10:27am
[2 replies] Last: Thanks a lot Peter87 (5640). :D (by abdalimran)
|
by Nielyboyken
Check if specific key is pressed
|
Hello I want to know how to check if specific keys are pressed. But also on different systems. How to do this for Windows systems? How to do this for al... |
Aug 17, 2014 at 7:42am
[4 replies] Last: Thanks for mentioning that one as well. (by Nielyboyken)
|
by abdalimran
Output problem
|
I've just written the following code. Everything the program gives output is as expected..but a '1' is automatically printed. Thats unexpected. Here you'll f... |
Aug 17, 2014 at 6:59am
[2 replies] Last: Thanks a lot! It is supper clear now. You are awesome Disch! :) (by abdalimran)
|
IF ELSE IF |
#include <stdio.h> main(){ system("color E8"); float grade; printf("\n\n\nInput your Grade:"); scanf("%f",&grade)... |
Aug 17, 2014 at 5:56am
[11 replies] Last: @Christian0555 Glad we could help. @TheIdeasMan The example isn't con... (by BHX)
|
by Ch1156
Help with Networking
|
Ok so I'm using SFML and C++ to do some networking, and I was following a video tutorial on youtube and the program is a chat function, it chats, but what happe... |
Aug 17, 2014 at 4:26am
[1 reply] : IIANM, for full duplex communication you need two connections. 1. A li... (by helios)
|
by Czelusniak
I would like a better understanding
|
Hello, programmers and programmers a like, I'm kinda of fairly new to this website and c++ it's self, I've done a little programing in Python , and a gaming sty... |
Aug 17, 2014 at 4:13am
[3 replies] Last: for saving information in C++ you gotta learn file handling.It is read... (by cyberdude)
|
by galactus
printf problem
|
This is just a small program I wrote to find a problem with a larger one. Everything changes when I add the line with scanf. I know it is not safe, I read other... |
Aug 17, 2014 at 3:27am
[9 replies] Last: IdeasMan, I did and nothing bad happened. My problem was with initiali... (by galactus)
|
by T4l0n
random order in array
|
I wanted to have a program that inputs the number of elements in the array, inputs the int variable of the element and outputs the numbers in random order, with... |
Aug 16, 2014 at 9:57pm
[3 replies] Last: alright thanks a lot, i made a third loop only to randomize "i" and it... (by T4l0n)
|
by Nielyboyken
Getting content of text file and putting it in an array
|
Hello I've got a question but don't really know how to explain it. But I'll try it. I have a text file including names, now my code should take those name... |
Aug 16, 2014 at 8:53pm
[2 replies] Last: ^Thanks a lot for your reply! Extremely useful! :D (by Nielyboyken)
|