Beginners - January 2012 (Page 13)

2 colons and no identifier infront ... wtf?
 
Hi, what does the two consecutive colons in the text with bold letters mean? static void func () { } ctor::ctor () : member_1 (), member_2 ( ::func () ...
[2 replies] Last: Yes it is standard syntax and it means that func is in the global name... (by Peter87)
DISPLAY POSITIVE AND NEGATIVE
 
#include<conio.h> #include<iostream.h> void main() { clrscr(); long input,negaAr ,posiAr ; for (int x=0;x<10;x++) { cout<<"enter:"; cin>>input; if (...
[7 replies] Last: simply put, you've done it all wrong . (by ThangDo)
linking error on assiging function pointer to static member
 
This code gives me linking error: void func1() { cout<<"func1()"<<endl; } class a { public: static void (*func)(void); }; int _tmain(int argc, _TCHAR*...
[1 reply] : Hi dude, this is the god damn solution to your problem (the line in bo... (by billythekid)
array1[array2[1]] question (1,2)
 
In JAVA, the language I program in normally, array1[array2 ] means that you take cell 1 out of array2 and use that number to access the relevant cell in array1....
[26 replies] Last: Here is a tip for you: If you want to ask how a function is doing what... (by closed account 1vRz3TCk)
Overoading operators
 
Hello, I am very new to c++ and need a bit of help please. I am writing a program to calculate the area of a cylinder. I have come across a few problems alread...
[2 replies] Last: Thanks makes sense. (by May1111)
Function error.
 
Hello, I have made a function which looks like this: void MapRead(int ** a, int rows, int cols, int level){ stringstream ss; ss << level << ".aem"; ifstream...
[7 replies] Last: Thankyou very much. This helped well! (by Exispistis)
where to mention the line i want from txt file...
 
i want the user to provide detail about the line and the program to provide the total line please help . i have tried many things but it shows some part or whol...
[4 replies] Last: Did you include <limits>? (by Peter87)
Whats wrong with this codes
 
Whats wrong with my program. please help me correct my program because it does not do what i want it to do. #include <stdio.h> #include <conio.h> void...
[1 reply] : Your for loop runs forever and i always remains 0. Use for(; str... (by Stewbond)
question about formatting cout
 
My current assignment is to prompt the user for a name and gross pay, then apply a series of taxes and payments, then save the results (in formatted form) to an...
[1 reply] : I'm sure there are serval ways to do this but take a look at the use o... (by histrungalot)
Need help making a game
 
I am just starting out in c++, I want to make a game to tell you your fortune... very simple obviously. It will ask you to choose from 2 numbers and whatever on...
[6 replies] Last: #include <iostream> #include <ctime> #include <cstdlib> #include <cm... (by Aramil of Elixia)
by GOLF O
Pointers
 
I am trying to write a program and I have the following code: #include <iostream> using namespace std; void readSizeAndAllocateArray(int ** ptr, i...
[2 replies] Last: When I take your suggestion of removing the -1 and the *size I still g... (by GOLF O)
Sterilizing User Input
 
I'm trying to make sure that cin never gives me an error, no matter what the user inputs. This is what I have so far. while(!(cin >> width)) ...
[8 replies] Last: try string then string stream it into an int and test it for numbers t... (by Aramil of Elixia)
How do I embed a C++ program into a website?
 
i just want to be able to let my friends try out my programs from the internet. i have a really basic website to work with (my real website is down). help me?
[5 replies] Last: hmm. ok. thank you :) (by mrossim)
palindrome program
 
so this program is suppose to read from a file and see if its a palindrome or not, there is something off with my code and i was wondering if anyone can see wha...
[5 replies] Last: oh wow, thanks it works now (by jmbauer1)
by oyoung
Why do you put & after istream?
 
Hi im new to this language. I'm so confused about this. When you make a fuction which reads a number to a variable, you put '&' after istream. istream&...
[5 replies] Last: Here's something: how do you think of this in your head? MyClass *... (by LB)
Help with fstream (1,2)
 
Hi, I am a newcomer to C++ and the forum and recently I have been spending most my time making a simple RPG game. My most recent implementation was going to be ...
[23 replies] Last: No prob. Good luck coding (: (by Lynx876)
Parsing a string
 
First of all I am less informed than a "beginner". I have a program that was written for me several years ago and I no longer have acces to the programmer. Ther...
[no replies]
Trouble with program loops.
 
Okay, so I'll cut right to the chase here and link my program. while (mathType != "added" || mathType != "subtracted" || mathType != "multiplied" || mathType...
[3 replies] Last: It all depends on what what you want to check. a && b is true if bot... (by Peter87)
Splitting String
 
I am trying to split a string like "8573656.5465467.5435325.3253255" into separate int variables each containing the group of numbers between the dots. Someone ...
[3 replies] Last: getline takes an optional delimiter to tokenize a stream. Just feed t... (by moorecm)
Stubs and Driver any1?
 
Im studying the use of stubs and drivers. I basically know what their use is, but im not sure how to use them or implement them. Not understanding the concept...
[4 replies] Last: Thanks you described it very well but i guess im going to need to actu... (by nickoolsayz)
January 2012 Pages: 1... 1112131415... 48
  Archived months: [dec2011] [feb2012]

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