General C++ Programming - July 2011 (Page 27)

Constructors
 
I got other output from what i expected: #include <iostream> class Foo { public: int data0; int data1; Foo(int d0, int d1) : data0(d0), data1(d1) { st...
[5 replies] Last: There are compiler options to disable the copy elision, once you do th... (by ashishkumar)
by paeez
stop runnig program
 
Hello all dear First , thank you for all of your help I have a program that run for 1000 time and I give the size of network and it calculate time , Now f...
[5 replies] Last: Thanks for your answer but I should use big sizes for my program... (by paeez)
Why the output is messy code
 
I use the below code: #include <cstdio> #include <iostream> #include <fstream> #include <cstring> int main() { std::ofstream fs("file.txt"); std::...
[4 replies] Last: termination character is needed for c strings that are not of the len... (by Athar)
transfering excel database to oracle database using c++
 
hey...m working on a project to cop[y the excel database to oracle 10g database using c or c++....in the project i have to copy the excel database using c or c+...
[1 reply] : Questions: Is this for a class? Why use C/C++? Scripting languages (Py... (by Gabe 101)
Lookup table for distances/ sqrt question
 
I made the code below to test which is faster, sqrt or using a lookup table with a ton of random floats and it turns out the first method, the function named me...
[2 replies] Last: I also forgot to put the sqrt in the second method but I guess the acc... (by lostwithcpp)
by smalld
string literal question
 
Hi all, I am reading about string and find the following in the book: Some compilers treat string literals as read-only constants, leading to a runtime error...
[3 replies] Last: Thanks. (by smalld)
X and Y coordinate problems
 
Here is my code so far: #include <allegro.h> int x = 10; int y = 10; int textboxy1 = 400; int main() { allegro_init(); set_color_depth(32)...
[11 replies] Last: #include <allegro.h> int x = 10; int y = 10; int textboxy1 = 400; in... (by closed account GbX36Up4)
CALENDAR USING CLASSES C++
 
how do I find the first day, and how can I output the numbers of the calendar in the usual order as they're found on hard or virtual copies of calendar: Here is...
[3 replies] Last: The code above is flexible and is independent of the year and month. N... (by Alrededor)
trouble in moving ball and bar at same time (brick game)
 
Hi i am making a simple brick game using win32 console application. I am facing trouble in moving ball and paddle at same time. In the game ball is need to ...
[2 replies] Last: Check this out: #include <windows.h> #include <stdio.h> #include <co... (by m4ster r0shi)
Pass by reference to a vector
 
I am not very familiar with vectors and my school book does not help much. I have been researching as much as possible but I am just lost. Here is my function a...
[4 replies] Last: I got it. Thank you. (by monkeybutt)
efficient use of multiple threads
 
I was having too much trouble with CreateDialog() function in windows so I just decided that my help messagebox would be the product of a new thread. Is this...
[4 replies] Last: static variables are dangerous in the idea they are never unallocated ... (by closed account S6k9GNh0)
Constness Question
 
Consider the following: struct a { }; template<a const& token> struct b { }; a const x = a(); //a x; typedef b<x> c; int main() { } Line 1...
[2 replies] Last: Templates have external linkage, type and non-type arguments also have... (by closed account z05DSL3A)
when to separate
 
Same code as before... I feel as if I have too much packed into one file even though it works well. When should I start to separate code? I feel like a...
[4 replies] Last: The inline keyword is just inline . Inline functions are not called ... (by anonymous23323124)
Help on fortune teller
 
So im planning on making a fortune teller program. I got a basic idea of it but when i compile it i get an error. "ISO C++ forbids comparison between pointer an...
[9 replies] Last: If your Code::Blocks version is up to date then it could only be the w... (by anonymous23323124)
by Lola
getting started profiling c++ with shark on OSx
 
Hi, I would be very happy if someone could help me with the following: I am trying to optimize a c++ code on a Mac OSx 10.5.8 using shark 4.7.0. Now I do n...
[no replies]
by hwuy
web launch
 
im new to c++ and I wanted to know if its possible to embead applications made form c++ on browser and if that is true i wanted to know if it was possible with...
[3 replies] Last: I just found out that flash is one of the only choices for playing gam... (by hwuy)
cin not working
 
hello again! today I tried making a small program using the cin function however my compiler said that there was "no match for operator> in 'std::cin> i'" plea...
[2 replies] Last: thanks! that fixed it I'm not sure why I dident that I missed the seco... (by GeckoLink)
2 Good C++ Books
 
Hello all, I was just wondering what 2 good C++ books are there for this , one to use as a reference to normal console C++ programming and one to use as an i...
[3 replies] Last: I have been using c++ for about a year.I'll look into the Qt framework... (by TheCallSign)
by HenriK
C++ & aspect oriented programming?
 
Hello, programmers! I´m well aware that C++ contains at least following programming paradigms: - generic - object-oriented - prosedural Now, after s...
[1 reply] : Following the link to the source at the bottom, we have: Several: Asp... (by Zhuge)
Programme gives error while compiling
 
I have written a simple programme but it is not compiling, give these errors 1."cout undeclared first use this function" 2."cin undeclared first use this fun...
[13 replies] Last: thanks a lot "Ather" , "L B" and "Xander314" I am new at c++ first of ... (by irfansweb)
July 2011 Pages: 1... 252627282930
  Archived months: [jun2011] [aug2011]

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