Beginners - July 2012 (Page 50)

pointer to class problem
 
I have a class Dog, and another class template Cat. In Dog's constructor I pass a pointer to a Cat<char> object. I then use the pointer with the -> operator, bu...
[1 reply] : It looks like you are using the Cat<char> object instead of the pointe... (by Peter87)
Checking for messages sent over TCP using boost
 
Hello, I'm trying to make a server program using boost asio and boost serialization. The client is sending object-based messages. What this piece of code is sup...
[2 replies] Last: Ah, I think I didn't really catch the asynchronous part I think, I'll ... (by Werner2)
by dert45
Segmentation Fault with a matrix class
 
Hi everyone. I am writing a program using dynamic 2D arrays to manipulate matrices. I am currently overloading the operators and I am getting segmentation fault...
[3 replies] Last: That's good. Let's take a look at operator+. // you pass by value, ... (by kbw)
switch case vs if else
 
if we compare this codes..... #include<stdio.h> int main() { int x; printf("enter a number under 3 : "); scanf("%d",&x); if(x==1...
[6 replies] Last: Thanks everyone for helping. (by time to c)
by alan91
Program using Nested For Loops
 
How to write a program using nested for loop to display the following output: 0 * * 0 1 2 * * * * 0 1 2 3 4 * * * * * * * * * *
[3 replies] Last: this is what i have, but understand anything #include <iostream> usi... (by alan91)
getchar () and EOF
 
#include<stdio.h> #include<conio.h> main() { int nc; for (nc = 0; getchar() != EOF; ++nc) ; printf("%...
[3 replies] Last: ... try Ctrl-Z. (by Catfish2)
New with C++
 
Good morning guys, I just recently started learning C++ and was hoping to make small programs with GUI... I already tried Visual Basics 2010 but people sa...
[7 replies] Last: API = Application Programming Interface. You can think of it as a l... (by LimitBreaker15)
int and char
 
#include<stdio.h> #include<conio.h> main() { char c='amsdlsn'; printf("%c",c); getch(); } output: n Q.1why is it that whatever i take the ...
[4 replies] Last: q1..yeah but why is it that last digit is output and not any other? q2... (by vgoel38)
Weird sf::Sprite movement
 
I've been messing around with the input on SFML, and ran into this weird bug. Not sure what's going on. I have an idea, but not sure how to deal with it, and if...
[8 replies] Last: use speed*App.GetFrameTime() and your problems are solved (by gelatine)
2- Dimensional Arrays for grading
 
Good Afternoon, I'm having trouble with a assignment that deals with 2-Dimensional Arrays that should output the letter grade for every students from an inp...
[5 replies] Last: Did you check what I said? You have scores declared as a one dimensio... (by fg109)
calculate post fix equation
 
this is my input and i get the correct output for post fix , i get this really large number for the out of it and i dont know why. Enter the damn infix expre...
[no replies]
For the newbies: new input algorithm
 
I have created a new input algorithm for my "passwords and accounts" program that i thought was worth sharing. It uses 2 variables: a character and a string to...
[10 replies] Last: @ fg100 OH! I get you. intresting. @ne555 I wrote cl() as function... (by IWishIKnew)
converting char to an int
 
so iv been doing alot of looking on how to do this i see atoi alot but just donst seem to work form me bool ope(char op) { if (op=='+' || op=='-' |...
[4 replies] Last: you can use atoi by passing the address because it expects a pointer: ... (by wanher3)
stack problem
 
so getting the sum of a postfix equation , im using push and pop until the whole string is gone thru, when it should be done i should have one value left, i wan...
[no replies]
by khulme
do while loop using a for statement
 
The program compiles and runs, but errors out at the beginning of the do-while loop. Any suggestions are greatly appreciated. It's possible it's the combinati...
[3 replies] Last: i think i got it. let me know if you have suggestions. // more_fu... (by khulme)
lots of questions about this file
 
Hi, I'm a beginner at c++, and really stupid at it. I have so many questions about this file, tried my best to google answers but still really can't figure them...
[11 replies] Last: I finally managed to do it. Thanks a lot still! (by bluebell09)
Smallest integer
 
I am attempting to find the smallest integer from an undetermined amount of integers... the logic of my code does not work (it does not know which integer is sm...
[5 replies] Last: oh wow... thank you... i feel stupid now... (by nothing3)
error: invalid conversion from `char' to `const char*'
 
im new to c++ im having a problem comparing strings i want it to return true or false code: bool ope(string op) { if (op=="+" || op=="-" || op=="/" |...
[2 replies] Last: thx! (by bfox2269)
Two questions in one (computing pi)
 
I finished a program recently that simply computes the value of pi up to about 5 decimal places. The program does what it's supposed to do....almost. However, a...
[14 replies] Last: ah i get it now...i think that should do it..thanks to everyone (by algoRichard)
Is there any way to count numbers
 
I have to make a program that displays any number that the user enters backwards. So far I have only come up with a way to display a predetermined amount of cha...
[8 replies] Last: This definitely was a major help. I'm still a little cloudy on the /=... (by Phil123)
July 2012 Pages: 1... 4849505152... 54
  Archived months: [jun2012] [aug2012]

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