General C++ Programming - July 2013 (Page 9)

Does order of declaration matter?
 
Hello, I have recently found this article: http://en.wikibooks.org/wiki/Optimizing_C%2B%2B/Code_optimization/Faster_operations And I am quite surprised...
[3 replies] Last: structure fields are aligned to byte boundaries, i think msvc aligns t... (by Jaybob66)
How to forbid file replacing in fstream library for C++
 
How to forbid file replacing in fstream library for C++? #include <iostream> #include <fstream> using namespace std; int main() { ofstream myfile...
[5 replies] Last: Thank you. (by rizaado)
POINTER VS VARIABLE
 
What do the two examples/variants? DIFFERENCE? POINTER-Dynamic memory and Variable-Static memory? V1: int a; a = 1; cout << a << endl; cout << &a << endl; ...
[10 replies] Last: So C++ is crippled for garbage collector. C++ gives you the power to... (by MikeyBoy)
Any good C++ program creators? (like visual studio)
 
Can anyone tell me a good c++ coder program, preferably with the URL. Thanks!
[7 replies] Last: +1 for visual studio. (by mutexe)
how to sum up two arrays together?
 
for example if we have array1 = {1,2,3,4,5} and array2 ={2,3,4,0,7) how do you sum them up as 12345 + 23407 . And when i say sum I mean normal mathematical ...
[4 replies] Last: > for example if we have array1 = {1,2,3,4,5} > and array2 ={2,3,4,0,7... (by JLBorges)
Problem while the object is being destroyed
 
I have implemented a Double Linked List. I have a problem when it start main(), almost at the end of the execution the program crash. I find that the program cr...
[1 reply] : That's quite an ambitions data structure. A slightly different approa... (by kbw)
how to capitalize the letter after a space in an array?
 
hello! I've been struggling with this code for quite a while now. the assignment is to read a data file with a list of names, capitalize the first character...
[2 replies] Last: Try this: 1. Check if the first token is the first letter in the line.... (by Snaksa)
"stdafx.h" in visual studio vs file.h in DevC
 
hi everybody, i want to ask the diffrent about stdafx vs struc of file.h. In visual studio 2010, does "stdafx.h" include "iostream", "string"...and the functi...
[1 reply] : It includes whatever you put in it. (by cire)
How to flip a number
 
so if we have a loop like that int i-0 while(i<5) { Sum= i + 2 i++ cout << sum << endl; } output will be 2 3 4 5 6 now what if i want to plac...
[5 replies] Last: It is enough to change only one statement i = 0; while(i<5) { Sum= ... (by vlad from moscow)
printing trash?
 
how to program print only the inversion of the word? thank you #include<iostream> #include<stdio.h> using namespace std; void inverte(char *t){ cha...
[4 replies] Last: My code works correctly. It is you who are even unable cimply copy and... (by vlad from moscow)
data from file to array
 
Hello, to make this simple i have names in a text file followed by three scores. I have tried and tried to get this to work but im totally lost. I need to take...
[1 reply] : Maybe we could help if you gave us your code. (by closed account N36fSL3A)
Bad value result from operator= using objects
 
Hello all, I keep getting an undesired value in this code. I've tried several methods, but none are giving me the correct answer. The out put is always zero...
[6 replies] Last: Yeah... I see it now. :( Blinded by the light. Can't believe I missed... (by pholotic)
help me with void pointers
 
Can you explain me this code line by line with detailed explanation? and when should i start learning win api? im have covered the tutorial in this site to poi...
[7 replies] Last: line 10 -15 and how you pass paramets to that function I already show... (by kbw)
auto query
 
Hi, When I replace auto& x with auto x at line 1 in the above, the code throws compilation error - saying that the thread is inaccessible. I do not underst...
[2 replies] Last: thanks, Peter - got it (by matiz303)
Can we return a function in another function ?
 
Can we return a function in another function ? or All functions are returned only to main ? for example int main () { int size1, size2; function1(si...
[6 replies] Last: Foo. I thought this question was going to be about function pointers o... (by Duthomhas)
How would you modify a header of any file? ex. mp3, exe, jpeg, etc
 
All i want to do is modify a header of a file(.exe file). I just want to do if for fun and see what I can do with it. I would like some example code that would ...
[3 replies] Last: You got it @naraku9333. I want to change the file header. I know you c... (by Manvir Singh)
by er4zox
Accessing class functions in a vector
 
Hello guys! I'd like to know how I can use class functions in a vector. I have 2 classes: Gamemode class bullets class Inside the Gamemode class I de...
[2 replies] Last: Without testing for ( auto &b : Bullet ) { if ( b->collision() )... (by vlad from moscow)
compiler is very slow
 
From some reason my gcc compiler is taking 2 minutes to compile, as if it waits 2 minutes then compiles. I'm testing it with the basic hello world program so i...
[19 replies] Last: I was referring to what DTSCode said, 250MB is the minimum for the ope... (by zoran404)
PS/2 Controller both keyboard and mouse?
 
What happens when the keyboard and the mouse have data ready to be received at the same time? Which one does the controller choose? (See bit 1&5 on the status p...
[8 replies] Last: I don't know the ARM architecture well enough to answer that question.... (by Computergeek01)
First-chance and Unhandled Exception in my code.
 
Hi folks, I am trying to write a code to isolate Strongly Connected Components in a graph using Kosaraju's algorithm (Runs DFS on reversed graph first and on...
[10 replies] Last: oh ok (by closed account Dy7SLyTq)
July 2013 Pages: 1... 7891011... 34
  Archived months: [jun2013] [aug2013]

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