General C++ Programming - December 2011 (Page 10)

Compiler Optimization - Static Int Template
 
I was wondering if any could tell me if a compiler would optimize something like below. I was also wondering if what I am trying to do here can be done with met...
[5 replies] Last: Thanks for the reply, that is interesting, it takes away from all the ... (by closed account o1vk4iN6)
Memory, pointers, structs problem
 
Hello, I have problem with my application(s) - win32. I have client and server (nothing connected with net, just names) both have defined same structure. Server...
[5 replies] Last: What you are suggesting sounds a bit like remote procedure call (RPC):... (by Galik)
Problem with Text Based RPG
 
#include "stdafx.h" #include <iostream> #include <string> #include <fstream> #include <time.h> #include <stdlib.h> using namespace std; int input_in...
[3 replies] Last: kev82 is right. It is your switch statement in the goto_war function.... (by Skaggz)
load a .dat file into a listwidget QT
 
the user inputs 3 different values into 3 text fileds and then hits a button that adds them all to a text file then loads what is in that text file into a listw...
[1 reply] : Assuming you're using Qt4, have a look at the QListWidget addItem(cons... (by mmay)
Division with random numbers
 
ok, so i made some adjustments and it works but now im trying to make it more shorter if possible? Here is my code... case 4: while(true) { x=rand...
[4 replies] Last: Thanks man, thats what i meant but didnt know the coding for it. (by louflow)
A VERY DUMB Question
 
what is the difference between void FunctionX( int* X1) and void FunctionY (int& X1) for calling x1....
[9 replies] Last: Passing by reference must surely be smaller than passing a large objec... (by mik2718)
SFML & Windows 7?
 
For some weird reason sf::renderwindow window; window.create(/*...*/); window.clear(sf::color(255,0,0)); window.display(); Doesnt actually create a window. ...
[3 replies] Last: I ran into the same problem with SFML 1.6 on Windows 7 with VS 2010. ... (by Stewbond)
problems using peek()
 
Im SOO stuck. Writing a program to read a txt file and output the contents according to the linelength. I'm having problems with reading the spaces and \n chara...
[9 replies] Last: Cool! What was your final approach, then?? (by andywestken)
Operator Overloading
 
Can any1 here explain that why operators like 1. Dot operator(.) 2. Scope resolution operator(::) 3. Conditional operator(?:) 4. Pointer to member variable...
[2 replies] Last: The arrow operator -> can be overloaded. (¿didn't you use iterato... (by ne555)
i need help with very simple encryption C++
 
basicall i just want to write to a text file but have it encrypted and then load that file back and have it decrypt it. i dont want any sory of encryption ke...
[1 reply] : You can use XOR enxcryption scheme: int main() { char key=10; c... (by Null)
How can i see all the data afte execution?
 
Hi, i run the program and after execution i can see only the last results... Is there any way i can see all the results from the beginning? Thank you.
[6 replies] Last: Where should i write "$ ./program.bin | more"? (by chtsolak)
by irwin
getting last few of lines of data from txt file
 
hi, this is my .txt file. Read RMS voltage Register! 00980C7E 0.5939 Actual voltage! 237.5762 Read RMS current Register! 0002AEE6 0.0104 Actual cu...
[5 replies] Last: Well, technically you don't have to read the entire file, you just h... (by Duthomhas)
Issues with textures using OpenGL
 
I am currently using Dev C++ as my IDE. I am attempting to learn to add texture. I may be completely off here, but this is what I have. It creates a white box i...
[1 reply] : You have many problems: 1) You need to call glEnable() and enabl... (by Disch)
by benp84
Seeking data structure advice
 
I'm working on an algorithm that requires the following task as a subroutine: Given a large (~10^7) array of identically-sized vectors of 'double' values, su...
[7 replies] Last: It seems likely the OP is developing Pareto front software? This li... (by mik2718)
Is this the proper way to print out a multi-dimensional array?
 
Here's what I wrote : #include <iostream> #include <fstream> #include <string> using namespace std; int main() { // Created a multi-dimensional...
[3 replies] Last: I would like this .. for (int row = 0; row < 3; ++row) { // Loop... (by bluecoder)
How to store strings read from excel cells?
 
Hi, i can read and store numbers read from excell cells in 2-dimension matrix but how can i store strings which i can read? The concept is: user changes the c...
[5 replies] Last: Thank you very very much!!! Anything you need tell me! (by chtsolak)
Difficulty With char_create() function?
 
int char_create() { cout << "Hello! What's your name?" << endl; cout << ">"; getline(cin, username); cout << "Hello " << username << endl; cout << "...
[4 replies] Last: Already on that. Added it after I posted this lol. (by Nathaniel Sheller)
need explanation and guidance
 
#include <iostream> #include <iomanip> using namespace std; //function prototype void show(void); void display(void); void summary(void); //double g...
[2 replies] Last: yes! it's work! thank you very much! :)) (by angel paripari)
"fstream" Help!
 
Hello everyone. Just having a little bit of an issue. I'm using Visual Studio 2010 and this won't compile correctly. It compiled just fine when I used Visual St...
[4 replies] Last: It now works. Thank you. (by Nathaniel Sheller)
Crypto++
 
so basically i just need crypto for a very simple function but i am new to C++ and i have no idea how to do this. i am making a projectin QT for desktop applica...
[5 replies] Last: yea iv seen that in a few places where iv been lookin for a solution a... (by Tom King)
December 2011 Pages: 1... 89101112... 39
  Archived months: [nov2011] [jan2012]

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