General C++ Programming - March 2011 (Page 13)

Help with function pointer syntax
 
Hi guys, I need some quick help. I want to know how I can write this better, I'm sure it's possible. I've only learnt it this way. I have a library, with a c...
[1 reply] : It's possible, but why would you want this? It gets very ugly without ... (by Branflakes91093)
read all lines in text file and store in one string
 
Hello I am making an encryption program and It is working.The only problem I have is that my program only stores the last line of of the text file in the string...
[2 replies] Last: getline() can accept a deliminator parameter. This means that it will ... (by ModShop)
Sorting problem
 
Hello everyone! I'm far from understanding all I do with C++ so please forgive my foolish mistakes. I'm sure it's something simple but I don't know what I d...
[9 replies] Last: Just wanted to post a few links. These should be all the tools needed... (by sharris)
by Katma
File input and modules
 
I'm doing another project for school, and I'm struggling a little with a few glitches I'm having. What happens is the program asks for an input file name, and t...
[6 replies] Last: Well, one small modification is to substitute line 87, which is curren... (by simeonz)
prints something but i don't know why
 
http://i52.tinypic.com/153npcx.jpg my code is alright, but why it prints me this -85893460 #include<stdio.h> #include<stdlib.h> #define N 20 vo...
[7 replies] Last: i copy-paste your code and now it works.... i can't understand lol t... (by Black Pearl)
Linking Libraries - VC++ 2010 - General
 
I am having some confusion about how the linking of separate or 'third party' libraries works. First off, what is the difference between static linking (.lib fi...
[3 replies] Last: Very very helpful posts, thank you so much. That cleared up everything... (by Nuclaer)
C++0x doubts: RValues and Move semantics
 
Can anyone give me an explanation about the new features of C + +. I wonder what kind of reference that is represented by two & (is a reference, right?). What ...
[2 replies] Last: thanks, Bazzy. I did not think the specialization of templates to sepa... (by pavanetti)
Question about geting my program to work muti part program frist try
 
Question about puting mutiple programs into one. I am studying C++ for part of my networking course and am not the best at it. This week have to combine smaller...
[2 replies] Last: I appreicate that still kinda hard to understand but il try it the exa... (by dtw103184)
by JRevor
Operator << overloading apparently not working.
 
The following code compiles, but does not "work". It's supposed to print "There goes foo 0 1 2 3 4 " but instead prints "There goes foo " #inc...
[2 replies] Last: oh my god.. XD I stop programming c++ for 6 months and this happens to... (by JRevor)
by venot
i need some basic guides to write this program
 
i have problem's with how to write a program that will find the largest and smallest integer numbers and their location in a set of numbers
[15 replies] Last: #include <iostream> #define MAX 100 using namespace std; void max (... (by Janlan)
by Icenel
How to Split a Word into letters
 
char letters ; char input ; gets(input); My input is "binary" then I want to have b >> letters i >> letters n >> letters a >> letters r >> lett...
[6 replies] Last: In both cases you are comparing a character to a C string. You need t... (by PanGalactic)
Class ? O_O
 
Ok, I do medium level C++ exercises, but I havent done yet a ”class”. I have here a matrix (done be myself ( copyright 2011© jumper007® ) ;D ), and I dont...
[2 replies] Last: In this specific case, it might make sense to think about modeling mat... (by PanGalactic)
Sorting objects in a vector?
 
I'm writing a program that requires me to sort a vector of objects. I already know how to compare two objects in the vector based on a member variable, but how ...
[12 replies] Last: I tried the swap() function in the algorithm header and it's still not... (by packetpirate)
Parameter of a global function is undeclared
 
I'm trying to use a class object as a parameter in a global function which is defined in my main.h, but I'm getting undeclared identifier errors. #ifndef MA...
[2 replies] Last: It did indeed include main.h, and that fixed it. Thanks! (by uviviii)
string method definition
 
Hey this is my first post and im trying to figure out how to complete this method definition if someone could help that would be great: MyString::MyStrin...
[1 reply] : Look at strncpy(). Also, s does not have any member functions, so s.c_... (by PanGalactic)
Switching between bitmaps and writing to the console
 
So I am making a game and I want to be able to switch between bitmap scenes and writing directly to the console. I have bitmaps writing to the screen and I can ...
[4 replies] Last: Figured it out! I was switching between two screenbuffers and setting ... (by skibbyama)
Purpose of the Comma Operator
 
I think that the comma operator returns the rightmost expression so 10, 12, 15 returns 15. However, I have a few questions about the operator. Firstly, are c...
[7 replies] Last: Ok. I can see how that might be useful on occasion... So thanks again... (by anonymous23323124)
by chess
c problem
 
I should write a program for simple calculator that does addition,subtraction,multiplication,division and module. It should work like that :ask user to enter e...
[2 replies] Last: I think you should have ch = getchar(); before line 27. EDIT: You s... (by simeonz)
A matrix
 
A code for matrix made by myself, I know that I didnt translate the comments but I hope you will manage well understanding #include <fstream> using namespa...
[2 replies] Last: yeah, I did an update for it. And good idea Ill do a class for it ;D ... (by jumper007)
Function generator
 
Hello to all, I want to make an integrator to compute a physical problem. My function should take a function and return or generate a new function which is t...
[8 replies] Last: Well, I have no experience with it whatsoever, but I think I should th... (by simeonz)
March 2011 Pages: 1... 1112131415... 31
  Archived months: [feb2011] [apr2011]

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