49,761 Topics

Member Avatar for
Member Avatar for jerryjerry

hello everyone, My doubt is related to access specifier. There is one code snippet - [code=cplusplus] class Base { public: explicit Base(); static int object_count; protected: int id; }; class child: public Base { public: child(int val) : id(object_count++){} }; [/code] This code is giving compilation error that id is …

Member Avatar for jerryjerry
0
290
Member Avatar for gispe

hi ppl, im havin a problem with a while loop. it just doesnt go out of it, it has the end, but doesnt use it :S the program is attached :P [code=cplusplus] // ventas_por_correo.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> int main(int …

Member Avatar for gispe
0
70
Member Avatar for Hannahlv

Hi everyone! I'm doing my project related to socket programming. The send and receive part I got problem. The code is below : Server side: [CODE] printf("Handling client %s\n",inet_ntoa(their_addr.sin_addr)); if (send(new_fd, "Menu\n", 5, 0) == -1) //(1) perror("send"); if(send(new_fd, "1. A.mp3, 2. B.mp3, C.mp3\n", 26,0) == -1) //(2) perror("send"); if(send(new_fd, …

Member Avatar for Salem
0
127
Member Avatar for EngSara

Hi... [code]// read the whole file through one line at a time while(getline(in, line)) { // check does this line start with the tag string 'SER(FIT):' ? // note: there must be no tabs/spaces at the start of the line if(0 == line.find(tag)) { // yes it does, then use …

Member Avatar for Salem
0
87
Member Avatar for CoolGamer48

Say I have a file file1.h: [CODE] namespace a { int Func() { return 5; } } [/CODE] and a file file2.h [CODE] #include "file1.h" namespace a { class Foo { Foo(); }; } [/CODE] and file2.cpp: [CODE] #include "file2.h" a::Foo::Foo() { Func();//<---- } [/CODE] Can Func() be referenced like …

Member Avatar for CoolGamer48
0
79
Member Avatar for Lukezzz

I have created a listView on my Form. In the properties I have created 2 Columns. What I now wonder is how you can put text in each column. I have tried out this code but no Text is coming up in the listView1 at all. Could I be on …

Member Avatar for Lukezzz
0
110
Member Avatar for TheBeast32

Hi, how would I make a program that gets input from a user, sends it to a program with popen(), gets the output, and repeats this until the program ends? I have tried, but I only get part of the output, and when I type "exit", it won't end the …

Member Avatar for TheBeast32
0
1K
Member Avatar for sbbs05

Hello, I need help in completing the following flow charts please. I read my text but still have no clue. I appreciate any help. Thank you. Currency Conversion Development Assignment—Flowcharts Complete the flowcharts for the assignment above by typing into the textboxes below. Control Flow Diagram—Main Control Control Flow Diagram—Display …

0
63
Member Avatar for Ccrobinson001

I have a program for clas that requires me to write a random number guessing game. I completed the game but i have to use functions in the program and I am not to familiar with this. Can some one help me? Here is the code and here are the …

Member Avatar for Ccrobinson001
0
236
Member Avatar for sickle

Hi, This concerns Microsoft Windows. I want to know when a window from other processes is made visible. Also, I want the handle of the window. I've tried to catch the message WM_SHOWWINDOW with SetWindowsHookEx(WH_GETMESSAGE, &MessageProc, g_hInstance, 0) but I receive no events ! The only events I receive is …

Member Avatar for sickle
0
402
Member Avatar for brk235

hallo friend iam dealing with strings in C and C++. I want to know how strcat(),strcpy()...etc functions are defined in the cstring library function. Can we see the definition of these inbuilt library functions. Please give me reply friends, Thanks, Rama

Member Avatar for ArkM
0
73
Member Avatar for gispe

hi ppl im back here, but with another problem in another code. in this one i have to count how many sellers reached the top sells. thing is that if i put one that reached the top at the end, the program doesnt count it, it counts only the first …

Member Avatar for gispe
0
100
Member Avatar for xxReYMaXxx

[B]helow, can someone help me with my problem. my Teacher give me a problem, he want me to make an array that the output would be my name, buth with a space on it, [/B] [B]example:[/B] Raymond [B]output:[/B] R a y m o n d & R a y m …

Member Avatar for robertmacedonia
0
141
Member Avatar for cam875

Ok, I was wondering if somebody could give me some clarification on a topic that just doesn't seem to make sense to me. I have a class that tells my program all the attributes needed to build another player in my game but there could be 3 players logged in …

Member Avatar for CoolGamer48
0
94
Member Avatar for jamshed

This program is supposed to simulate a Reservation System of Daewoo. Using this program, Daewoo ticket reservation agency assistant can perform different tasks related to ticket reservation. The Daewoo Reservation System will ask the user for the following information : • Name of passenger • Departure City • Destination City …

Member Avatar for ssharish2005
0
603
Member Avatar for kneel

Project Title: Daewoo (a Bus service) Reservation System Project Description: This program is supposed to simulate a Reservation System of Daewoo. Using this program, Daewoo ticket reservation agency assistant can perform different tasks related to ticket reservation. The Daewoo Reservation System will ask the user for the following information : …

Member Avatar for Salem
0
105
Member Avatar for cmatos15

Hey everybody, I seem to be stuck on this rolling dice problem I received on one of my lab exercises. Can somebody get me started on the right path. Here's a description of the problem along with the code given. The green indicates where I need to insert code. DESCRIPTION: …

Member Avatar for cmatos15
0
2K
Member Avatar for gispe

hi! im havin a problem with a program ive made. problem is that doesnt show messages. dont know whats wrong :S also attach the program [code=cplusplus] // cartas_paquetes_v3.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> int _tmain(int argc, _TCHAR* argv[]) { using namespace …

Member Avatar for ArkM
0
91
Member Avatar for tapaditap

I'm having a problem with retrieving records from my file just started programming over a month a go please help this is for my class project. I need to do delete,update,query,and add to binary file and prompt the user to enter which record they need to retrieve and i started …

Member Avatar for ArkM
0
108
Member Avatar for CoolGamer48

In regard to good style, is it better to use the NULL macro, or should you just use 0? And should you cast either one to the type of pointer you're using? i.e.: [CODE] int* pInt = (int*)0;//this, int* pInt2 = 0;//this, int* pInt3 = (int*)NULL;//this, int* pInt4 = NULL;//or …

Member Avatar for ArkM
0
294
Member Avatar for 11silversurfer1

hi i have searched the net to find how to make an edit box but i havent found anything. Please help thanks

Member Avatar for 11silversurfer1
0
53
Member Avatar for Tigran

Hello, Lateley, I was searching for a good WinAPI book (for c++ ofcourse) After a while searching, i found this book: Programming Windows, 5th Edition by Charles Petzold The book looks good and is nice and thick (1500 pages or something) But where I worry about it the age of …

Member Avatar for Frederick2
0
122
Member Avatar for zourlas

Hello mates I have a new question... I have 2 2-d arrays with the same dimensions and contents. The first one, say a [15][4] and the second on, say b[15][4] and are both char type. They both have the same elements(same 4character Lines) but in different order(the second one's Lines …

Member Avatar for zourlas
0
117
Member Avatar for CoolGamer48

A friend of mine recently asked me how one would convert a .bmp font to a .ttf. I said I was unsure, but it got me thinking to how I would code a program to do that. How would someone who wants to create a .bmp to .ttf converter go …

Member Avatar for ArkM
1
138
Member Avatar for Frederick2

Just decided to try the new Code::Blocks IDE on an old ODBC program of mine that I had always compiled as a C program. I decided to redo it as a C++ program and immediately hit a nasty problem that I never ran into in C. It involves a Typedef …

Member Avatar for Frederick2
0
307
Member Avatar for dashisneo

heyy i am a beginner in c++. i am trying out to develop a code to display the date in dd/mm/yy format . also i am interested in validating the date( like for eg a month feb only 31 is invalid) and it should display "date invalid" if the date …

Member Avatar for VernonDozier
0
116
Member Avatar for kriscbe

hi all, i want to generate a timestamp with year,date,month,day,hours,min,seconds,milliseconds. in my code i generated a time integer with the help of time(). with that integer can i generate timestamp with milliseconds. sample code: [code]int len; time_t mytime; presentTimeStamp = 1999999950;//this value is return from time() mytime = presentTimeStamp; struct …

Member Avatar for Salem
0
243
Member Avatar for ThomsonGB

Hi Folk An aside from the computability issues. I am running into a specific error where the best solution eludes me. Suggestions please! I am looking for advice from someone who may have seen this before: Compiling manifest to resources... Linking... sub_proc.obj : error LNK2019: unresolved external symbol __imp__InitializeSecurityDescriptor@8 referenced …

Member Avatar for ThomsonGB
0
483
Member Avatar for anirudhbsg

hi i want to know that if i want to include the results from internet how can do it by using a port in c++

Member Avatar for sandip kaur
0
150
Member Avatar for Emerald214

I use VC++ 6.0 1) This small program simply reads infomation from file “in.txt” and write it in file “out.txt”. (copy contents from this file to another) 2) It doesn’t work. The compiler issues an execution-time error. And the ouput text file “out.txt” is empty. 3) I don’t know why …

Member Avatar for Emerald214
0
131

The End.