Beginners - December 2012 (Page 25)

populating 2d array after initialization
 
Hello all. Long time listener, first time caller here :D I am writing a 2d array with functions that I am asked to initialaize (with a function) and then po...
[3 replies] Last: void getRatings(int reviews ) { int reviews = {{3,1,5,2,... (by goth)
by kske
Decrement operator
 
I don't why this confuses me but can someone tell me what the output of this code would be. int count=3; while (--count) cout<<count<<' '; cout<<endl; ...
[4 replies] Last: ++x = increment then return. x++ = return then increment. Just read ... (by ResidentBiscuit)
Making a basic calculator. Help!
 
I am trying to make a basic calculator. So the first problem i have is with division. How can i get a decimal when i divide? The second problem is how can i hav...
[8 replies] Last: #include <iostream> using namespace std; int main() { double one... (by hugejass)
Expected unqualified id before
 
I'm new to this and really confused how to fix this: #include <iostream> using namespace std; int main() { char cChar; double dfirstnumbe...
[3 replies] Last: You're missing the code tag from the beginning of your post. :) But r... (by Kazekan)
ERROR: statement has no effect
 
Hi! i really don't understand why this piece of code wont work: bool b1,b2,b_closetag; b1 = l_content.contains("</"); b2 = l_content.contains(">"); cout << "^...
[5 replies] Last: oh! so sorry overlooked that..thanks! (by noisycoder)
increment and decrement
 
Hey what's the trick for incrementing an array by one and decrementing it by one. I know you can't actually do this to array's but I remember there is a trick m...
[8 replies] Last: Nevermind I just figured it out. Thanks though. (by jlillie89)
Computer memory
 
How much memory does a long long int take? I have a 64 bit computer. I was wondering cause I have used them around 2 or 3 times and am worried that I might be u...
[7 replies] Last: The 64-bit thingy means your common unit of measure (int) should be 64... (by S G H)
loop
 
Good night every one ... when i run my program its give me an infinity loop!! i really give up and i need help ... thnx #include <iostream> #include <f...
[5 replies] Last: #include <iomanip> customer << setprecision (15) << MobileNumber ...... (by Chervil)
by shafh
Throwing string
 
Hey everyone. I'm trying to throw an error. And to make it simple to understand i would like to type a string. I have trie: throw "ERROR IN NAVIGATION R1...
[8 replies] Last: Am i wrong? I don't think you are wrong. What you have is a C strin... (by Peter87)
What's my problem?
 
I'm going to print the highest and the lowest among 3 numbers. #include<stdio.h> int main() { int num1,num2,num3,num4; int lowest, highest; printf("F...
[5 replies] Last: Remember that an else clause will only execute if the preceeding if ... (by Disch)
by Ace93
Read in a txt file and print it out
 
I have an assignment that prompts the user for a file name, and then print the contents of the file out to the screen. If the file doesn't exist it prompts the ...
[2 replies] Last: The infinite loop occured, I was able to fix it because of your commen... (by Ace93)
i want to know about dynamic storage allocation
 
Please me explain about complete with examples dynamic storage allocation
[1 reply] : Why would we waste time re-doing what is already freely available if y... (by cnoeval)
trying to build generic linked list- help
 
Hi i started to write a code of generic linked list in c but i having trouble my struct looking like : typedef struct Node{ void* item; struct Node*...
[3 replies] Last: my assignment is to build a generic linked list because of that i'm us... (by yyoni69)
Please help me to solve this problem .(C++ Calculation)
 
Question: A parking garage charges RM 0.50 per minute fee. Write a program that prompts user to input the number of hours and minutes parked. The program wil...
[10 replies] Last: TQ so much! I'm done :) (by naemahabdullah85)
Why am i getting the same result when i switched my agrument?
 
#include <iostream> using namespace std; int pow(int a, int b){ int numb=a; while (b>0){ cout << numb<<endl; numb = numb ...
[2 replies] Last: Just get it, got a bit miss concept back then. (by selenium)
Some very specific questions about C++ writing.
 
Hello I'm a real newbie on C++. I just started to learn it by my self and it really draws me in... I'm using a book: 'Beginning Programming with C Plus Plus ...
[2 replies] Last: Thank you very much Thumper! It really helped me! (by shalito)
Loop through data file and calculate average
 
Hello, I'm trying to loop through a .dat file and calculate the average of a group of numbers. Here is what the data looks like. So essentially I am trying to...
[5 replies] Last: So essentially I am trying to skip certain numbers out of the data fi... (by Chervil)
by tomz6
How to make string variable of unknown/dynamic length, not terminated by 0?
 
If I don't know the size a string will be, and if that size may change later, and if that string may contain '0' characters, what methods are there to do this? ...
[3 replies] Last: There is no other way than dynamically to allocate memory for a new ch... (by vlad from moscow)
#include
 
So I am self teaching myself c++ and I am following this tutorial and it just said to put these, and I do every time and I know they are needed, but what do the...
[2 replies] Last: #include <someFileName> the # tells the compiler to do something ... (by Stewbond)
by patbb
very beginner loop question
 
hello everyone, i'm just trying to pick up programmingand im really not that mentally predispose to excel at it apparently, so please forgive me for my very ...
[8 replies] Last: > but using the same variable names in different scopes is confusing a... (by ne555)
December 2012 Pages: 1... 2324252627... 65
  Archived months: [nov2012] [jan2013]

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