Beginners - July 2012 (Page 46)

Getting compiling error in the cplusplus file
 
Pl find herewith a file "color.txt" and there are some errors which may please be seen for further guidance.
[no replies]
counting no. of input lines
 
#include<stdio.h> #include<conio.h> main() { int c, nl; nl = 0; while ((c = getchar()) != EOF) if (c == '\n') ++nl; printf("%d\n", nl); getch(); } ...
[2 replies] Last: yeah..you are right.. :P..thnx (by vgoel38)
by abaz01
matrix array
 
hi, im trying to write a program that sum each row of an array and prints it out along with the total sum of the array. heres what i have done so far #incl...
[no replies]
take a look at my calculator? have any suggestions for improvement?
 
I just started learning c++ once again after a few months of break.. during that break though I learned all the basics of css and html. Do you have any suggesti...
[6 replies] Last: case '/': Answer = Num_A / Num_B; break; This might result in brea... (by HiteshVaghani1)
by ojbway
Assign Function Reference
 
Is it possible to store a pointer to a function inside a variable? I feel like it is but I just can't figure out how to do it. I specifically want to try to cre...
[3 replies] Last: Keep in mind that pointers and references are different (in particular... (by Cubbi)
by khulme
global vs. local variables
 
if i declare global variables a, b and c. then in main i declare local variables c and d. then i have a function that uses the parameters c and d. do c and d...
[3 replies] Last: ah yes, Disch. thank you. i remember that now. and thanks BlackSheep. (by khulme)
by khulme
valid int pointers
 
these are marked as invalid C++ code in my documentation. not sure why. would appreciate any insight. int ptr = &num1; int ptr = int *num1; float nu...
[11 replies] Last: got it. thanks everyone. (by khulme)
by jorz
is is is
 
what does happen here variable1 = variable2 = false; does this mean variable2 = false; and variable1 = variable2; ? Many thanks
[2 replies] Last: thank you (by jorz)
What is wrong with my code
 
I am working to create a contact card type-thing where the user enters their information and at the end they will see a contact card. The first name, last name ...
[5 replies] Last: Wow, do you "really" need all of those functions? One of the reasons ... (by Phil123)
Converting a general list using an array to now use a linked list
 
Oh boy. Linked lists are not my friend. While my understanding is better than it was last year, it is still pretty bad. I completed the "General List" assign...
[2 replies] Last: A linked list is not like an array. Data is stored in a node structure... (by closed account D80DSL3A)
Returning 0 versus returning 1
 
I am working on some recursion problems, and I have a question about returning a 0 versus a 1. The book shows this function, which I suppose is a factorial fun...
[5 replies] Last: Right, I didn't take much looks at the "return n * F(n-1)" part. Thank... (by S G H)
Dereferencing operator overloaded []
 
Hello, I need to know how to dereference operator overloading functions void Function(vector<int> *pVector) { cout << pVector ; } this would ...
[2 replies] Last: Thanks firedraco, I tried again and for some reason it worked, I must ... (by Jesus805)
Is there any way to make this code simpler??
 
This exercise displays the average of n numbers and the standard deviation of those numbers. To be frank, this program was a brain buster and took me forever bu...
[5 replies] Last: Sorry for the late reply but thanks so much. I would have never caught... (by dtaqee88)
If and else if help.
 
I am coding a simple math game that is using a lot of if and elses. When the first question goes through if the answer != 12 is should say incorrect but it does...
[8 replies] Last: Thank you. Sorry for taking the code. (by SuperNyan)
logical operator and while loop
 
what i am doing wrong? #include<stdio.h> int main() { int num; do { printf("enter 1 2 or 3 to exit : "); scanf("%d",&nu...
[3 replies] Last: thanks. XD (by time to c)
Fibonacci Sequence
 
I am trying to write a program that asks the user for a specific number then displays that many Fibonacci numbers using a for loop. All I know is basic c++, ...
[4 replies] Last: try to create it yourself. (by Akshit)
Switch/case
 
Text
[6 replies] Last: Ok, thanks for the answers. (by Doppler)
Can a programmer take over from another
 
I work for a company where the C++ programmer has died suddenly and there is no one else that is capable of programming. Is it possible for an experienced prog...
[11 replies] Last: Thank you to everyone that has replied. I am based in the UK and I do ... (by FrankAntares)
GUI Buttons = Program crashing / New Member
 
So I'm basically creating a quiz and when you click on either button1, button2, or button3, textbox1 will change the question, but the problem is that textBox1 ...
[1 reply] : its obvious, you suck! (by Carlos Alpuche)
Question about "include"
 
if I program this: if (mystr == "good") { cout <<" response 1"; } else if (mystr == "bad") { cout <<" response 2"; } is there a way that I ...
[7 replies] Last: if ( (mystr.find("good") != std::string::npos) || (mystr.find("... (by Moschops)
July 2012 Pages: 1... 4445464748... 54
  Archived months: [jun2012] [aug2012]

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