49,757 Topics

Member Avatar for
Member Avatar for Jsplinter

I'd like to represent an integer with a value between 0-100,000. Unsigned short int (range 0-65535) is too small. Unsigned int (range 0 - 4294967295) is big enough, but for a large data set this wastes a lot of space. Does there already exist a class that is in between? …

Member Avatar for Jsplinter
0
4K
Member Avatar for sternone

Hi, I found this forum with some google searches and I really enjoyed reading some Q&As here. I love C++, I love C++, did I told you yet I love C++ ? I hate C#, I really hate C# !!!!. did I told you yet I hate C# ? I'm …

Member Avatar for Onlineshade
0
362
Member Avatar for tomtetlaw

When I handle WM_MOUSEMOVE in my window prodedure, HIWORD(lParam) and LOWORD(lParam) are both a little off. It's returning a point that is slightly to the left and slightly above where my cursor actually is... What's really weird is that as I move the cursor closer to the top left of …

Member Avatar for tomtetlaw
0
549
Member Avatar for aznairjordan

i found out how to get each individual word from a text file. Now i am trying to limit each line to a certain number of characters. If the line limit is 10 and the word "string" starts at position 8, i need to make a newline and put "string" …

Member Avatar for Sky Diploma
0
209
Member Avatar for tyggagucci

hie guys could anyone help me on how i can read a delimited file as i view all customer details #include <fstream #include <iostream> #include <string> using namespace std; int main () { int choice [1]; string name; string idnumber; string address; string surname; string FileName; fstream myfile; string line; …

Member Avatar for deceptikon
0
200
Member Avatar for 330xi

How to hide and then to show again when I want to a standard menu toolbar in MFC doc view application?

0
92
Member Avatar for dimitrije17

Hello I would like to know how to make .bat files with a time trigger some thing like this: I make a file with autorun and it ahs a time trigger and after two monts it opens this file... can someone please help me resolve this problem..... thanks...

Member Avatar for dimitrije17
0
251
Member Avatar for Lord_Migit

Hi there. I am having some trouble trying to figure out how to delete a pointer that is held in a vector. int main() { vector<Test*> iVector1; vector<Test*> iVector2; vector<Test*>* pVec1(&iVector1); vector<Test*>* pVec2(&iVector2); pVec1->push_back(new Test(11)); pVec1->push_back(new Test(12)); pVec2->push_back(new Test(23)); pVec2->push_back(new Test(24)); //delete iVector1.at(0); delete iVector1[0]; iVector1.at(0) = new Test(21); pVec1->at(1) …

Member Avatar for Lord_Migit
0
253
Member Avatar for vincent5487

Write a program that prompts the user to input the start time and the stop time in hours and minutes (use 24 hour format), and then print out the time spent in work in hours and minutes. For example: Enter start time : 9 30 Enter finish time : 13 …

Member Avatar for subith86
0
202
Member Avatar for yavindu
Member Avatar for WaltP
0
80
Member Avatar for DonutsnCode

Hi guys, Your typical C++ beginner here. I'm using the renowned Deitel C++: How to program to learn C++. I am my own mentor and here's what I can't comprehend: What's a Dangling Reference? According to Deitel C++: How to Program and I quote "Functions can return references, but this …

Member Avatar for elmohler
0
929
Member Avatar for 9tontruck

Hi guys, I am having a small problem on using QNetworkAccessManager in QThread. The error message is: "Object::connect: No such slot QThread::replyFinished(QNetworkrReply\*)" And my code is header class SSLReceive : public QThread { //Q_OBJECT public slots: void replyFinished(QNetworkReply* net_reply); protected: void run(); private: void initialize(); QNetworkAccessManager* manager; QSslConfiguration config; }; …

0
176
Member Avatar for Dadkhah

it is my first time which I want to use ethernet card to read some date from PLC my application/software . does any body has an expereince? is it possible introduce a example or any reference for this isuue? thanks a lot in advance.

Member Avatar for skatamatic
0
175
Member Avatar for abdelhakeem

Hello Daniwebers! I was just reading This C++0x Beginner Tutorial: http://www.daniweb.com/software-development/cpp/tutorials/373787/beginning-c0x-making-a-raii-class And I was confused by something: " `int_vector(int_vector& aV);` > Obviously, this type of constructor would allow the transfer of the resource, since the source object can be modified and put into an empty-state (or "zombie-state"). But there are …

Member Avatar for abdelhakeem
0
210
Member Avatar for timberwolf94

I have been trying to write a program for the game of life and have been having some issues. The rules are: 1. Any live cell with fewer than two live neighbours dies, as if caused by under-population. 2. Any live cell with two or three live neighbours lives on …

Member Avatar for TrustyTony
0
341
Member Avatar for DubyStev

Hello great people, I have a challenge passing array into functions.. I will be very grateful for quick responses.. THANKS

Member Avatar for mike_2000_17
0
238
Member Avatar for rhoit

i don't know how it happen but the exe formed after compilation was 1.23 MB which has never happen before.

Member Avatar for rhoit
0
366
Member Avatar for lewashby

#include <Stdafx.h> #include <iostream> #include <math.h> #include <stdlib.h> #include <time.h> using namespace std; int rand_0toN1(int n); int main() { int n, i; int r; srand(time(NULL)); // set a seed for random-number generation. cout<< "Enter number of dice to roll: "; cin>> n; for(i = 1; i <= n; i++) { …

Member Avatar for ravenous
0
149
Member Avatar for poolet

Hello, Well I am trying to finished the following progam and I need help with 2 functions [i]reverse book(s)[/i] and [i]return book[/i]... If someone can told me points where to start I will appritieate:: below is my code, note that I don't know if the [i]customer_book_count[/i] is work since I …

Member Avatar for mike_2000_17
0
166
Member Avatar for hamzakhan

Hello, I'm new to this community and well to C++ itself. I'm trying to create a graphical calculator which displays the parabolic path of a projectile in the form of a graph plot, but the problem is that I don't even know how to plot points on C++.So can any …

Member Avatar for mike_2000_17
0
193
Member Avatar for altec64

Hi there this is my first post here :) So I got an assignment about TicTacToe project here's a basic header and main file of my project I think i should made a basic one before adding some "advanced" features please help with the logic of the command undo thank …

Member Avatar for mrnutty
0
1K
Member Avatar for BigEEter

Hi. I am wondering if a log file can be created in a header which is associated with a try-catch block. Below is my stripped down code for the log_header.h and log_test.cpp Here is log_header.h #include<fstream> #include<iostream> using namespace std; class thrower{ //fstream myfile2; public: void errormessage(); }; void thrower::errormessage(){ …

Member Avatar for BigEEter
0
390
Member Avatar for rezonk

#include <iostream> #include <iomanip> #include <fstream> const int NUM_SURVEY=3; using namespace std; struct Survey { int IdentificationNumber; double annualIncome; int numberOfHouseMember; }; void getData(); void calculateAverage(); void findPoverty(); void printReport(); int main() { getData(); calculateAverage(); findPoverty(); printReport(); system("pause"); return 0; } void getData() { Survey Households[NUM_SURVEY]; int i; cout<<"------------Enter " …

Member Avatar for abdelhakeem
0
214
Member Avatar for MasterHacker110

I am currently using code::blocks but i am experinsing trouble trying to link the ws2_32.lib and other libraries. I tried visual studio express but it doesnt work with me. What are some good FREE c++ compilers that have very easy library linking and are rather user-friendly and that i can …

Member Avatar for MasterHacker110
0
186
Member Avatar for hii...

In my project (Borland C++ Builder, Windows Xp ) am using following code for opening the file TOpenDialog *OpenDialog; OpenDialog->Filter = "all files (*.*)"; OpenDialog->InitialDir="::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"; OpenDialog->Execute(); But the "My computer" tab is empty its not showing the drives. Rest "My Rescent Documnets" , "Desktop", "My Documents", "My network drives" all …

Member Avatar for hii...
0
430
Member Avatar for 330xi

Hi! Only two windows-dialogs in my programm. On button click I do this->EndDialog(0); MyWiew mw; mw.DoModal(); ShellExecute(0, NULL, fdlg.m_ofn.lpstrFile, NULL, NULL, SW_MINIMIZE); But MS WORD opens file and starts only when mw is closed. How to start it with the mw together? Thanks in advance.

Member Avatar for 330xi
0
89
Member Avatar for dakoris73

Hello everyone; I've been struggling with trying to figure out how to get this struct program to work and I'm at a total loss on this. Basically I need to create two structs POINT which will have an X and Y values, and a LINE struct which will include 2 …

Member Avatar for subith86
0
128
Member Avatar for mrexp21

I have a file, 'date-list.txt' which has date in it. For example , 20 May 2012 . Now I want to compare this date with current system date and show the difference in days . How can i compare dates and shows difference in days in C++.? Im really a …

Member Avatar for subith86
0
139
Member Avatar for hwoarang69

hi in this if statment i want to paste image if lever[r][c]==1 else i want to add space. i dont know how to add space. my think is that i would have to use dbText() or dbPrint() function? if(level[r][c] == 1) { //dbSprite(1, x*32, y*32, 1); dbPasteImage(level[r][c], x, y); x+= …

0
92
Member Avatar for stephanieirene

The file contains the instructions. I need help by tonight. Please Help!!!! main.cpp: #include <iostream> #include <fstream> #include "addressbook.h" #include "addressbook.cpp" int main(){ ifstream inStream("input.txt"); string line, header, token; vector <string> tokens; getline (inStream, header); AddressBook myAddressBook; while(!inStream.eof()) { getline (inStream, line); cout << line << endl; int x=0, y=-1; …

Member Avatar for stephanieirene
0
238

The End.