Beginners - February 2013 (Page 36)

Why dont i have the grey bar for debugging on the left side of my work area?
 
Im working on a C++ project right now in Visual studio 2012 and i want to do some debugging to fix a problem with my program but there is no gray bar at the lef...
[1 reply] : I'm not sure what gray bar you're referring to, but F9 is the default ... (by Disch)
by orly24
suggestion
 
Please help!! how to run the > symbol properly?? here's what I've done.. suggestions please... while(rat>81) { y=rand()%15+10; switch(y) ...
[6 replies] Last: Specifically, "value computation" is not all that rat15++ is doing. (by Cubbi)
for loop
 
I'm very new to c++. Just a question: in a for loop, is it possible to funnel the previous RESULT of the loop back through the loop? This is probably a very sim...
[6 replies] Last: aha! I didn't think of nested loops! Sorry. (by Lynx876)
Minute by Minute output
 
Hello there, I have been working on a code that needs to determine the number of ants that will destroy a stadium from a text file. Ants--Yards per min...
[1 reply] : You could create a simple timer. Note. It doesn't have to be a struct.... (by Lynx876)
Basics: Is it possible to print 05 rather than 5?
 
int x; cin >> x; //If user writes 05 in x. Then I want that 05 should be printed when we cout << x; //If user writes 005 when prompted for x then printing x ...
[3 replies] Last: If you just wanted to print a number with leading zeros, you could set... (by Chervil)
by rcast
Using array, returning odd numbers
 
I'm rusty with arrays. I have an array: int bits = { 128, 64, 32, 16, 8, 4, 2, 1 } When I try to use a for loop to output each element, it does output all of...
[16 replies] Last: Also, the inner loop can be simplified from this: int mask = 128... (by Chervil)
composition instead of aggregation
 
we have implemented a scenario and we used aggregation in it, after some time we realize that use of aggregation is not a correct choice, now we want to use co...
[no replies]
Review my Problem
 
Can anyone explain what could be better about this code please? Is the use of if, else if, while statements being used correctly? ***...
[1 reply] : I think it's quite fine. Just add else before 2nd if, though this prog... (by Rehan FASTian)
by Mefear
Need program help Please
 
Hello everyone, im new to c++ and have been having a hard time getting everything squared off. I am currently in need of help of this program to calculate s...
[no replies]
Hello World not working with Code::Blocks
 
Hello I am new to these forums, sorry if this has been brought up before, but this seems to be a specific problem related to Code::Blocks. I downloaded a fresh ...
[4 replies] Last: Try doing getline(cin, cityname); That should allow you to get t... (by fiji885)
getline not working
 
hello i have some simple code but it is just skipping my getline command so i can't input anything. could someone tell me what i am doing wrong ? string input;...
[6 replies] Last: It is the previous input, such as cin>>out; which caused the problem... (by Chervil)
by krutuk
Cannot convert
 
The mistake is error: cannot convert 'sStud' to 'sStud*' for argument '2' to 'void input(int, sStud*)' I don't know what shoud I do with this mistake. Here ...
[13 replies] Last: Peter87, thanks man, it really helped! (by krutuk)
by Azib
Aggregation and composition
 
Suppose we have implemented a scenario and we used aggregation in it, after some time we realize that use of aggregation is not a correct choice, now we want to...
[1 reply] : Composition is aggregation - the terms are equivalent. What were you ... (by TheIdeasMan)
by m20072
undeclared identifier, got no experience
 
Hey, before I post my problem I must say I have almost no experience at all with c++ tho somehow I managed to almost completely update something I really need t...
[7 replies] Last: Honestly, I am beginer too and I want to give an advise. Do simpler pr... (by krutuk)
How to write your name using a single letter in rows of 10
 
I need to write my last name using a single letter such as "L" in rows of 10. I know how to print my name but have no clue how to do it using a single letter no...
[3 replies] Last: The tricky bit is to put all the letters on the same line. One way is... (by Chervil)
Passing Function Pointer as argument to Member Function of the class
 
Hi all Here I need to pass an function-pointer as an argument to a function which is pointing to the non-static member function of the class. I am using VS-2...
[3 replies] Last: Hi Thanks all I was missing a header - file. i.e. #include <string>... (by bitsaket)
passing array to function errors
 
hello i have errors with this code: (question below) int invbinary(int arr ) { //binair --> decimaal int output=0; for (int i=7;i>=0;i--) { cout<<arr <<" ...
[2 replies] Last: o wow... worst mistake ever. thank you alot, it works now. (by gelatine)
The output is incomplete
 
I am just beginning to learn C++ with the book C++ Primer (5/e) , I met this program #include <iostream> int main() { // currVal is the number we're countin...
[1 reply] : The program will read numbers until it failed to read a number because... (by Peter87)
regarding main function
 
what is the use of 'int' in the command 'int main ()'?
[5 replies] Last: void main(){ } works with most compilers / libraries, too. Regar... (by Lodger)
Transposes
 
I need to write code to provide a 8 x 8 array of random numbers between 0 and 99. and displays the array and calculates the average of the array. Determine aver...
[1 reply] : Well, the code would be easier to read when formatted with the relevan... (by Chervil)
February 2013 Pages: 1... 3435363738... 67
  Archived months: [jan2013] [mar2013]

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