473,543 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C / C++ Forum

C / C++ programming language - Get answers to questions about compilers, visual C++, templates, namespaces, classes, data structures, OOP (object-oriented programming), inheritance, data types, exceptions, Standard Template Library (STL) and the C Standard Library.
3
1,659
thread by: amirseg | last post Oct 16 '07 by: weaknessforcats
Hi, If I have a class A without a default constructor, and I try to create an array in the fillowoing way: A arr; I get a compilation error. why when I use
16
1,659
thread by: zohaib.shirani | last post Oct 31 '07 by: osmium
i have got a quizz to write a programm that gives the sum of all even numbers between two variables x and y and then displays the sum. Include both x and y in the total sum. Any one here can help me............ ?
1
1,659
thread by: David d'Angers | last post Oct 25 '07 by: Mark Bluemel
hi group: i've been struggling with this simple problem with dismay i need all the file names in a directory since the number of files in a directory is unknown, a friend here in the group hinted me to use dynamic memory allocation: namely functions like malloc etc in the spirit of code re-use
5
1,659
thread by: mdh | last post Nov 30 '07 by: CBFalconer
Hi all, I have gone through the FAQ and done searches in the Comp.Lang and if I have missed it please let me have the ref. (Question generated in part by p119). Given char a;
2
1,659
thread by: xenoalien | last post Dec 30 '07 by: weaknessforcats
I have a program I wrote. I compile it and run it but it closes once it is done how do I tell it to pause when done? With C# language I wrote: Console.Readline();
1
1,659
thread by: DennyLoi | last post Feb 1 '08 by: JosAH
Hi there I am writing a simple while loop which terminates on the condition that a certain value is found, as follows std::string question = q.quest().que(); std::string answer = q.ans().answer(); std::string graphic = q.inf().info(); std::string english1; std::string english2;
2
1,659
thread by: sanjoycs | last post Aug 3 '08 by: sicarie
Hi I am new user of CImg, n it is my first posting here..:).... I wanna set RGB or HSV pixel value in a single pixel. like....In an image, at (x,y) coordinate I wanna assign my pixel value of RGB or HSV.....R=55, G=66 and B=99..... How can I do it?
0
1,659
thread by: lakshmiRam | last post Sep 5 '08 by: lakshmiRam
hi i have a code which was supposed to read data from serial com (bluetooth) and save in a file. but when i send a audio file from my mobile to pc the program will not read the port i have configured the bluetooth connection for serial communication (i.e from system stray selecting bluetooth icon and from quick connect selecting serial...
1
1,658
thread by: Oovee | last post Jul 19 '05 by: Peter van Merkerk
I want to know how to write a program in C++ that can be run in background, that running program should check mouse click and keyboard hit even if i am doing something else.
1
1,658
thread by: GSK | last post Jul 22 '05 by: Jack Klein
Hi, We have a Win32 application developed in VC++. It has few modal dialogs invoked by function keys. The application runs fine on a normal desktop or laptop in all versions of windows(NT,2000,XP) We are now trying to run in a dell poweredge server. And for some reason, some dialogs are not coming up.
10
1,658
thread by: hack_tick | last post Jul 22 '05 by: Wouter Lievens
hi there I was looking for some way to use bit field with Arrays something similar to struct Tmp { int iVar : 1; // each element of Aray having size as 1-BIT } it is possible ??
1
1,658
thread by: Ross | last post Jul 22 '05 by: Victor Bazarov
hi all, i once learnt from you guys to use _getcwd(pathbuffer, 255); with direct.h included to get the current path. it does work to get the path but it still doesn't work in a sense that when the command locating at the path is called, it doesn't work. i try to add \\ or use "" since the path has several directories and some may have...
2
1,658
thread by: Bjoern Knafla | last post Jul 23 '05 by: Bjoern Knafla
Hi! I am trying to specialize a member function of a template class (see code below). The moment the header with the "template class definition" and "template class member function specialization" is included in two different translation units (cpp-files). Problem:
2
1,658
thread by: pc | last post Jul 23 '05 by: Allan Bruce
Hi, Currently we are using a CDwordArray type array to store some DWORD data. This data is dynamic and we need to continuously grow the array size using SetAtGrow() . Due to performance reasons, we are planning to try out other possible choices (Cmap,Clist,STL.....). We want to use the Container that has the best performance in terms of...
9
1,658
thread by: danny van elsen | last post Jul 23 '05 by: danny van elsen
hello all, I have an application in which I build a list<node>, with potentially thousands of nodes. each node has an "index", and all nodes are ordered by this index. this index reflects a value that has been computed before, and will range from 0 to N. node 0: index 0
13
1,658
thread by: Tony Johansson | last post Jul 23 '05 by: Pete Becker
Hello! I just wonder if it's possible to overload a method only by having a different return type. //Tony
2
1,658
thread by: bipod.rafique | last post Jul 23 '05 by: bipod.rafique
Hello All, I have the following two classes: class testb{ private: int b; public: void friend_of_testa(); };
0
1,658
thread by: maddog | last post Sep 14 '05 by: maddog
I keep getting the same warning and I'm not sure how to fix it. Here's what my program looks like. The warning is an error C2065 and it's telling me that numWin and numDoor are unidentified variables. Can anyone help and soon? # include <iostream> using namespace std; int main () { double wallCost=25, winCost=18.73, doorCost=15.99; int...
4
1,658
thread by: ben | last post Nov 14 '05 by: xarax
hiyer, say you've got a 32 bit int - is there a nifty way to shift that whole value right by 4 bits and at the same time collect the 4 bits that are being shifted off the edge to the right into another variable? i'm hoping for a way to do it in one foul swoop ... ? probably not, but just wondering if there's a better way than the obvious :...
26
1,658
thread by: myName | last post Nov 14 '05 by: Dale Henderson
a && b || c is evaluated as (a && b) || c or it is evaluated as a && (b || c)
3
1,658
thread by: Peng Yu | last post Nov 14 '05 by: Mark McIntyre
I'm going to do something like this #define INSPECT( FILENAME,) \ ofstream FILENAME("FILENAME.out");\ For example, I want "INSPECT(abc)" open a file with name "abc.out", the file object's name is "abc". I tried the following code, but it still doesn't work. #define INSPECT( FILENAME,) \
6
1,658
thread by: Mabden | last post Nov 14 '05 by: Merrill & Michele
Suggestion to group: Let's have Dan and Keith summarize the month's "going's on" and write a synopsis. I have to work so much more lately, that I can't keep up. Can we just have a "Point - Counterpoint" once a fortnight, to keep me up on "important" issues?
3
1,658
thread by: Andreas Leitner | last post Nov 14 '05 by: Lawrence Kirby
Hi, I got a code snipset that gcc refuses to compile. I am note sure however whether this is a bug in gcc, or the snipset is just invalid C code. This is the source code in question: ---- typedef int foo; void bar1 (foo* foo)
2
1,658
thread by: JS | last post Nov 14 '05 by: Rich Gibbs
I have this struct: struct pcb { void *(*start_routine) (void *); void *arg; jmp_buf state; int stak; };
4
1,658
thread by: codefixer | last post Nov 15 '05 by: Kenneth Brody
Hello: I am trying to understand why one of these crash while the other works fine. long recurssion(int t) { if(t <= 1) return(1); else return(t * recurssion(t--)); //crashes

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.