General C++ Programming - March 2015 (Page 18)

Impressed by small code :)
 
#include <stdio.h> int main() { int n,count=0,reverse = 0; printf("Enter a number to reverse\n"); scanf("%d", &n); while (n != 0) { ...
[8 replies] Last: @LB Good Morning to u too Sir :). Thanks Alot! Actually its 9:30a.m h... (by Subscriber360)
Is it neccessary to declare a template for every function?
 
#ifndef H_LinkedListType #define H_LinkedListType #include <iostream> #include <cassert> using namespace std; //Definition of the node template...
[2 replies] Last: LOL Thanks!! I got this from a book and it just seemed way redundant.... (by programmercarlito)
by abc456
Can someone help me with this code?
 
nevermind
[1 reply] : [quote=amm123]how do you implement the following function in a list? ... (by LB)
More questions about PGMS
 
I have an assignment and I am down to these two questions. Assume myfile.pgm is a PGM file that opens successfully. What would cout << something below pr...
[3 replies] Last: 600 is answer (by TackyTechyy)
Questions about PGMs!!
 
I have a assignment answering questions about pgms... I'm down to my last 3 questions and was seeing if anyone could lead me in the right direction here. Than...
[no replies]
Is there a better way to write this code?
 
This is my first topic ever on your forum: I just finished paying someone do about 10% of my project. Before I get to the other 90% want to make sure I hav...
[4 replies] Last: Your right. He did get the job done. Thanks so much for your insigh... (by r322benson)
C++ threading
 
I'm writing an API that uses the ASIO SDK. In the SDK is has some callback functions that need to be implemented. They recommended that a separate thread be use...
[10 replies] Last: Okay thanks. (by cmajor28)
by Davii
Read from file error
 
Hey everyone. I;m writing a code that store information from a class to a file and then reads from it. it Write to the file correctly but when it reads from the...
[2 replies] Last: Thanks for replying. Firstly there is no error generated at all, it ru... (by Davii)
Problems converting unsigned char array to char array.
 
I'm trying to convert unsigned char array to simple char array. However, it throws a strange error: error: incompatible types in assignment of 'char*' to 'ch...
[5 replies] Last: [quote=hakeris1010]i'm just converting numbers to unsigned char (byte)... (by LB)
Problem with arrays..
 
Hi.. i have a problem with a question for my hw, now am not supposed to change the " int main() " : -------------------------------------------- - i...
[2 replies] Last: if you c++ you can use array container instead of language area. in th... (by sujitnag)
by xystus
Determining odds.
 
I just have psudo code atm, as i havn't started working on this yet. But lets just say: Player A has an overall skill of 1.39 Player B has an overall skill of...
[3 replies] Last: Also, lets say i generate 100 random numbers and use this same method.... (by xystus)
what is value function returns
 
Im having problems determining what value a simple function returns when the return value is return b<a. Its not a bool would have to return int value what va...
[1 reply] : if the condition is met, the function returns a non-zero number(probab... (by Aceix)
Why are Pointer multiplications not possible?
 
Hi, Why does this give an error: int* x; int* y; int* z = x+y; What I mean is: Why is it not allowed to add/multiply/divide Pointers? A int* is data like int is...
[8 replies] Last: +1 MikeyBoy. A pointer is not an integer. It's a pointer. There's a... (by Disch)
searching for a library.
 
so i am searching for a library that can make basic 3d models like cubes spheres and stuff similar to that nothing to complex like a person or a rabbit, i don't...
[1 reply] : you could take a look at OpenGL, but google might help you find more o... (by Gamer2015)
Editing Text files from a program.
 
We have been set a task to make an encryption program. My program must open and close text files whilst reading them and using the contents and encrypting th...
[3 replies] Last: http://www.cplusplus.com/reference/istream/istream/seekg/ but you cou... (by Gamer2015)
Program doesnt' work
 
I don't know why the program stops after line 27, it doesn't read ch or anything else after the first array #include <iostream> #include <fstream> usi...
[1 reply] : Double post: http://www.cplusplus.com/forum/beginner/159367/ (by cnoeval)
by Teoras
c2511 and c1004 error messages
 
hi everyone i would appreciate if any of you could help me out... i started not too long ago to program and today it seems i am stuck... i am trying to print a ...
[4 replies] Last: haha, sorry guys for the last post i suppose i was just too sleepy las... (by Teoras)
Base/Derived class pointers
 
I have no idea what is going on here, is there a non-confusing explanation to this mess, or a good write up somewhere. #ifndef BASEDERIVED_H #define BASEDER...
[2 replies] Last: Thanks, yes I missed that copy of line 17 I also found another explan... (by chouhaizi)
Interval for spawn of car2 (every 2 seconds)
 
// Beginning Game Programming, 2nd Edition // Chapter 8 // Tiled_Sprite program source code file #include "game.h" #include <time.h> #include <stdlib.h> ...
[1 reply] : Please, do not double post. It clutters forums and spreads attempts to... (by MiiNiPaa)
by Dkob1
Array, using template <class>
 
#include <iostream> #include <algorithm> #include <iomanip> using namespace std; // Function prototypes void DisplayA(int , int); void showArray(i...
[2 replies] Last: Please don't post duplicate threads for the same topic. http://www.cp... (by MikeyBoy)
March 2015 Pages: 1... 1617181920... 28
  Archived months: [feb2015] [apr2015]

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