473,544 Members | 1,685 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.
5
3,035
thread by: ken | last post Jul 19 '05 by: ken
IN the new gcc 3.3.1 I am getting messages like these: /data2/office/tools/bootstrp/sstring.cxx:105: error: cannot call member function `ULONG Container::Count() const' without object Where the Count is defined like this in the class: using Container::Count; So far I have worked around this by creating a member function. The
7
5,690
thread by: alexis | last post Jul 19 '05 by: puppet_sock
hi, i am writing a server that may be run from different systems. is there a way to determine what system (the one currently running the program) is, programatically? i was thinking about using getconf WORD_BIT but i'm not sure that is enough. i need to know the bitness b/c i am sending raw bytes from client to server and need to know how...
3
31,859
thread by: qazmlp | last post Jul 19 '05 by: Sergei Matusevich
I was using the following code to convert the string to lowercase. string foo = "Some Mixed Case Text"; transform(foo.begin(), foo.end(), foo.begin(), tolower); I thought the above code is portable. But, the following page has a different view on this: http://lists.debian.org/debian-gcc/2002/debian-gcc-200204/msg00092.html
1
2,308
thread by: claire.bell1 | last post Jul 19 '05 by: John Dibling
Hi, Im making an othello game project and ive got to the point where the basic game is done, but i need to add an intro and some way of deciding who you play against. My current structure is: There is a main class othelloProgram which is created in the main method. I want the othelloProgram to be in 3 main states, intro, game or newgame....
0
569
thread by: claire.bell1 | last post Jul 19 '05 by: claire.bell1
Hi, Im making an othello game project and ive got to the point where the basic game is done, but i need to add an intro and some way of deciding who you play against. My current structure is: There is a main class othelloProgram which is created in the main method. I want the othelloProgram to be in 3 main states, intro, game or newgame....
2
2,686
thread by: Peter Tawdross | last post Jul 19 '05 by: Mike Wahler
I need to use a c code with c++ project using kdevelop, can anyone know how
3
1,678
thread by: sudip chatterjee | last post Jul 19 '05 by: John Harrison
can a signed 'int', 'long' or 'double' datatype be changed int 'char' without using any standard library functions... sudip
2
6,771
thread by: Teddy | last post Jul 19 '05 by: John Harrison
How can I open a TCP Connection to another host in C++? fopen does not work (like in other languages). Thanks Teddy
1
4,256
thread by: Tivo Escobar | last post Jul 19 '05 by: Victor Bazarov
Hi all, anybody here can tell me what exactly is returned by the standard function time() in <ctime> (or time.h). Please dont tell me it is the number of seconds since 1 Jan of 1970 GMT, cos it is not (at least not in my case!). If I pass this number to a Java program (print it using a java.util.Date() object), the result is the current...
1
2,135
thread by: shea martin | last post Jul 19 '05 by: John Dibling
Is there a way to keep track of a build number within a program? Essentially incrementing a #define everytime the program is compiled (at link time would be even better, though tougher to implement). something like __DATE__ or __TIME__, perhaps __BUILD__? i.e., void printVersion() const { cout << "My Program\n(build __BUILD__)\n"; }
3
745
thread by: Sanjeev | last post Jul 19 '05 by: Aggro
Output of followin program at Turbo C++ 3.0 is 7 ( Not 2 or 3). Please explain why ? //////////////////////////////////////////////// #include<stdio.h> #include<string.h> void main() {
2
2,362
thread by: rajiv04 | last post Jul 19 '05 by: rajiv04
HI I am having a class using the dialog and I am trying to create an instance of that class in my project class so that when my project exe is excuted the control should go to the dialog class(which is using TCP/IP) Can any one help how to achieve this...I mean should I implement that in cpp or .h file of the project?
1
1,781
thread by: zhou | last post Jul 19 '05 by: John Harrison
Hi there, I got an error when writing to a file via ofstream. Is there a way to get detailed reason for the error? iosstate only has bad and good bits, no good enough to tell me what went wrong. ofstream fs; fs.open("aaa"); if ( fs << ....) { // error }
7
13,721
thread by: BCC | last post Jul 19 '05 by: BCC
Hi, I have a class with several member variables that should be initialized according to user input before an object is instantiated. Using a static variable is required here. But, I would like to have each object of my class have unique values of these variables, because the values may be different depending on some other factor in the...
1
1,520
thread by: A.L | last post Jul 19 '05 by: Dan Cernat
Does STLPort have a problem with the standard string and assignment? I am sure I am reading something incorrectly, but I don't know what: Here is a summary of a few functions _Self& append(_ForwardIter __first, _ForwardIter __last, forward_iterator_tag) .... /* Get the length of the data we are assigning into the string */
2
4,646
thread by: Xzyx987X | last post Jul 19 '05 by: Xzyx987X
Sorry if this is off topic for this group, but I couln't find any place better for directing question on Windows API programming. Here's the problem, I am calling the SetDlgItemText() function to set the text of an edit box for an about window for my program. For some weird reason though it won't work, and the GetLastError function gives a...
1
1,869
thread by: Sedney | last post Jul 19 '05 by: Aggro
I try to send out the TCP/IP packets with all parameters defined by myself (for test), but I find CSocket doesn't support to set with all kinds of options combination. So now this is what I am trying to do: program the TCP/IP message myself, but I don't know what level of API in VC++ can be based on? Is anyone know What API is just lower than...
3
3,051
thread by: Mysooru | last post Jul 19 '05 by: Mike Wahler
Hi All, One of the ATL class..... template <class Base> class CComObject : public Base { public: typedef Base _BaseClass;
2
1,760
thread by: Eric Liu | last post Jul 19 '05 by: Eric Liu
Hi, Can anyone explain why the following code works? The static object creation is via the private ctor. If I try to define a X object in the mainline, of course I will get complaint about calling the private ctor. I ran the code with CW8.3, it works fine. the output is: >Private ctor >dtor
1
2,220
thread by: BCC | last post Jul 19 '05 by: Karl Heinz Buchegger
Hi, This is kind of a followup to a previous question... I have a container class that has a load of variables (~100). For example, I have groupings like this: class CContainer { m_circle_area; m_circle_position;
2
9,813
thread by: Tim Veldhuizen | last post Jul 19 '05 by: Tim Veldhuizen
Hi all! I'm attempting at writing a networked program. It is going to be a threaded irc server in c++ using almost nothing but oop code. And it needs to know the full hostname of the users that connect to it. I already get some info from this code: workersock = accept(mastersock, &sockaddr, &addrlen); printf("Received a Client Connection...
1
2,225
thread by: sks_cpp | last post Jul 19 '05 by: tom_usenet
How can I get the following to work? Are the templates defined incorrectly? I am running this on Visual C++ 6.0. // =============================================== #include <iostream> using namespace std; namespace utl
1
3,995
thread by: Alex Vinokur | last post Jul 19 '05 by: Jakob Bieling
Hi, I have a problem with invoking an instance before main() when using memory allocation for static member. Is the program below valid? =========================================== Windows 2000 CYGWIN_NT-5.0 1.3.22(0.78/3/2) GNU gcc version 3.2 20020927 (prerelease)
2
2,021
thread by: Atz | last post Jul 19 '05 by: John Harrison
1.) If i want to make application which should communicate with laptop and cellular phone (thru cable or infrared) , should i use c++ / vc++ or something else.... Basicly, i want to send sms from laptop to cellular phone, and i want to execute some actions from my laptop on cellular phone, like send sms....
9
1,654
thread by: Austin Harvey | last post Jul 19 '05 by: Scott Condit
Hi all, Should be a simple one !! Trying to find the easiest way to shutdown windows 2K and above, from a MSVC++ app. Any ideas would be great, Cheers,

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.