Beginners - January 2013 (Page 48)

Time is not updating
 
I have code that references the function then adds "Process Started", does about 30 seconds worth of processing (in the test) and then puts in a separate line "...
[5 replies] Last: I called you function like: #include <ctime> #include <iostream> #i... (by jlb)
How to avoid global variables
 
Hey everyone! I've just started learning c++, and I've came to an issue when trying to avoid using a global variable. //Example static int numberOfAttempts...
[2 replies] Last: Thank you! It was a silly question :P (by DarioGi)
by Marcan
Question about constructor/destructor in a vector pointer
 
Hi everyone, First, here's the code: #include <iostream> #include <vector> using namespace std; class MyClass { public: //Constructor...
[10 replies] Last: I didn't know that vectors stored their data on the heap. I coincident... (by Marcan)
Stuck in a loop - Cin.ignore?
 
char confirmCar='n'; while((confirmCar!='y')||(confirmCar!='Y')||(confirmCar!='q')||(confirmCar!='Q')){ // system("cls"); cout<<"Please...
[1 reply] : You need to use && rather than || to combine the separate conditio... (by Chervil)
Complete Non-programmer; Can you explain what this code is doing?
 
Hello, I'm in need of fixing a script for my friend who currently isn't available; unfortunately I don't have any C++ experience, he does. I've been readi...
[5 replies] Last: This is excellent. Thank you so much. (by Terrible)
Variable isn't being initialized
 
I am trying to create a basic program that takes a binary number (0 to 15) and converts to hex. However, I am getting a run time error saying that b is being us...
[10 replies] Last: Wow! Great explanation, I understand this much better. Thank you. (by chiveon)
Color Text error
 
Hello, I have this code which compiles correctly but for some reason when I run the program the output is: sh: 1: color: not found Hello And "Hello"...
[7 replies] Last: ok I found how to do it http://stackoverflow.com/questions/2616906/how... (by DaveCas)
How do I repeat "template <class T>" less?
 
I am teaching myself templates in C++ classes and functions. The following code runs as expected, printing out "5" and then "Ned". #include <iostream> #inc...
[1 reply] : If you are defining a template member outside a class you should repea... (by vlad from moscow)
How to Draw a diamond in c++
 
How to Draw a diamond in c++ this ..^ .....^ ^ ....^ * ^ ...^ * * ^ ..^ * * * ^ .^ * * * * ^ ^ * * * * * ^ .^ * * * * ^ ..^ * * * ^ ...^ * * ...
[3 replies] Last: THANK YOU FOR ALL (by Man silence)
Program to count "the" word?
 
I made this program to count vowels in given words now what should I change in it to count word only 'the' in this program? #include <iostream.h> #include<co...
[4 replies] Last: Also instead of gets it is better to use cin.getline( ar, sizeof( ar )... (by vlad from moscow)
Transpose Matrix array manipulation
 
Hi guys I am working on this software Array Manipulation - Transpose of a Square Matrix: This program reads a matrix (twol dimensional array), displays its co...
[no replies]
Please Help me guys :S
 
hi i need to write a c++ program that make a hollow rhombus like this ******* ***.*** **.....** *........* **.....** ***.*** ******* pointed area ...
[2 replies] Last: There's been a lot of threads like this lately. std::cout << "*****... (by ResidentBiscuit)
by kid204
read txt file into array please help me !
 
Hi sir ! My assignment is : I have a text file and I have to read in that text file to get every 4 symbol after the symbol “=” of each element (ex : 1= ...
[3 replies] Last: Is there any reason you are using strings to hold these numbers? Thi... (by jlb)
by enemy
c++ online compiler
 
Hello! I wrote : #include<iostream> using namespace std; int main(){ int a; cin>>a; cout<<a; return 0; } on the page: http://ideone.com/UEl0...
[9 replies] Last: "upload with new input " works for me. (by Chervil)
Understanding of question
 
ok...this is the question and i dont understand it! Write a program in C + + to analyze a piece of music encoded through the Anglo-Saxon notation (notes ran...
[2 replies] Last: thank you stewbond...i have to be more open minded (by donfire)
Velocity Verlet Integration
 
I'm new to the idea of Velocity Verlet Integration, whereas before I was apparently using Euler's method. After finding out about this I returned to an asteroid...
[1 reply] : You are overwriting the value of `newAcceleration', so in the end just... (by ne555)
Reference to pointer to constant object
 
Hello! As the title suggests, how do I declare a reference to a pointer to a const object? That is, the pointer points at a constant object. I want to get the...
[2 replies] Last: Thank you, Vlad. :) (by Bobruisk)
breaking a loop styles
 
Is it just preference to use an if:break, or while:condition? Does it matter which you use in some circumstances or is it all just really programmers style? Is...
[5 replies] Last: Usually the for loop deals with some sequence where the next element o... (by vlad from moscow)
ceil?
 
#include <cmath> #include <iostream> using namespace std; int main() { float v, n; float k; cin >> v; cin >> n; k = (v * 12)/ n;...
[3 replies] Last: It worked :) Thanks (by Elzi666)
Why cant I use while statements!!!
 
I was doing a problem on this page: http://www.cplusplus.com/forum/articles/12974/ The problem is called 'while(user == gullible)'. I was doing this to refr...
[2 replies] Last: Wow... Im sorry i couldn't spot that. I am ashamed of myself. (by closed account LN7oGNh0)
January 2013 Pages: 1... 4647484950... 52
  Archived months: [dec2012] [feb2013]

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