49,761 Topics

Member Avatar for
Member Avatar for Bruynz

Hi, I am working on my next year's school project for my A levels, and I need a bit of help in deciding how to continue my program's design. Basically the project involves writing a stock managment software, for a fictional company. Now at the core of this programm lies …

Member Avatar for Bruynz
0
224
Member Avatar for Ubermatik

Hello, first off, I'm new to the forum and, more importantly, writing C++ and working with the iPhone SDK. I was wondering if anybody could help me - I'm really eager to keep learning, and everything has been okay until now. I'm getting an error that I can't resolve, no …

Member Avatar for Ubermatik
0
99
Member Avatar for c++learner

Hello, I have a 2D array of 10x10 and I want to search the surrounding cells of only a 3x3 portion of it at a time. How can I go about totaling up the values of the following nested loop? There should be a 1 or a 0 and if …

Member Avatar for c++learner
0
137
Member Avatar for VBNick

I have read all the MSDN docs on this subject that seemed relevant, but I am still confused about a few things. I am trying to achieve functionality like WSAAsyncSelect(), but use a separate thread instead of the main window. Can I use the regular WSAEventSelect() for this? and if …

0
47
Member Avatar for Schoorsteen

Hey there, I've been attempting some Win32 programming for a while now, but I just can't seem to find a function where I can get the HWND by the resource ID. Just an example: [CODE] CreateWindowEx(NULL, L"BUTTON", text, WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON, x, y, width, height, parent, (HMENU)IDC_BUTTON_OK, GetModuleHandle(NULL), NULL); HWND btn = …

Member Avatar for Schoorsteen
0
4K
Member Avatar for Sismetic

Well, I have a test program, in which I wanted to test if it was possible to open a textfile(text.txt) for input, display it via cout, then passing the object via reference to another function, in it and display the file again(which should already be open,which is the whole point). …

Member Avatar for Ancient Dragon
0
227
Member Avatar for eman 22

I want easy algorithm with minimum order to get the sub-rectangle with the largest sum in an array for example array as a input 0 -2 -7 0 9 2 -6 2 -4 1 -4 1 -1 8 0 -2 sub-rectangle 9 2 -4 1 -1 8 maximum sum of …

Member Avatar for AuburnMathTutor
0
573
Member Avatar for dogwood705

Hi, I am new to C++ and am getting stuck with just reading in data from a text file into an array. I have looked at lots of examples online, but can't find one that matches what I am trying to do. The data consists of two variables, date and …

Member Avatar for dogwood705
0
359
Member Avatar for PixelExchange

Hello everyone. I have recently finished a Winsock Server, and a Winsock Client. The problem is, I do not know what type of a domain/and or server I would have to buy to be able to connect my Winsock Server, to it. I already know that Winsock uses the inet_addr() …

Member Avatar for Aranarth
0
129
Member Avatar for saintboy

hi...following code is for postfix evaluation.....after executing the code i am getting segmentation fault error....can u help me to solve this error and what is segmentation error? [CODE=c++] #include<iostream> #include<string.h> using namespace std; class post_evaluation { public: int val; post_evaluation *nxt; void push(int i); void add(); void sub(); }; post_evaluation …

Member Avatar for mike_2000_17
0
150
Member Avatar for marcux

Hi all! I am programming in Qt and I am trying to draw a line on the screen, but it fails. My header file: [CODE]#ifndef GAMEAREA_H #define GAMEAREA_H #include <QWidget> #include <QPainter> #include "character.h" class GameArea : public QWidget { public: GameArea(); QSize sizeHint() const; protected: void paintEvent(QPaintEvent *event); private: …

0
52
Member Avatar for hasrule

Hi, I was working on thread pool, which I used std::vector to implement the pool. [CODE] private: std::vector <handlerthread*> _pool; handlerthread* temp; void threadpool::addWorker() { handlerthread *temp; temp = new handlerthread(this); int x=_pool.size(); temp->start(&x); _pool.push_back(temp); } handlerthread* threadpool::getIdleWorker(){ int idx=-1; for (int i=0;i<_pool.size();i++){ temp=(handlerthread*)_pool[i]; //SIGSEGV HERE if(temp->isIdle()){ idx=i; break; } …

Member Avatar for mike_2000_17
0
686
Member Avatar for vavazoom

I'm having an issue with the elimination portion of my Gaussian Elimination problem. The program crashes while running, I can't figure out what is causing the wrong rows to switch, and why it is not eliminating correctly. [CODE]void Matrix::gaussianElimination() { int i, j, max; for(j = 0; j < N; …

Member Avatar for mike_2000_17
0
214
Member Avatar for Bijaya123

I have a login form(Form1). Which has two text box(textBox1,textBox). when i clicked the Login Button another new form(Form2) is opened.This new form is a MDIPARENT form. I want to set the text of a lable of a new child form of this parent form which is same as the …

Member Avatar for cikara21
0
57
Member Avatar for mooseguy

I'm trying to write a small text editor in wxWidgets, using wxDev-Cpp. So far, all is well. However, for the life of me I can't work out how to print (As in, onto paper). As far as I can deduce, I need to use the wxPrinter class. Browsing the wxWidgets …

Member Avatar for allq
0
356
Member Avatar for steventaal

I am using wxDevC++, because I hate code::blocks and litecode doesn't do it for me, so the error I get when I try and compile is: cannot find -lwxmsw28 ld returned 1 exit status C:\Dev-Cpp\Makefile.win [Build Error] [Output/MingW/Project1.exe] Error 1 I've looked high and low, and I cannot find wxmsw28.lib …

Member Avatar for allq
0
165
Member Avatar for NejiHyuuga

im having a problem...i have a program to count number of senteces one inputs..the words and asking for a letter. The end of "\\close count" works fine...but for some reason the sentence and word programs doesnt work. could anyone please check this out. I think Iam missing something. I have …

Member Avatar for manali04
0
180
Member Avatar for PixelExchange

Hello all. I've completed both a Winsock server, AND a Winsock client using C++. The problem comes in when I attempt to bind a socket to a remote IP address. I get the message "Unable to bind to "IP address" port 80. I know for a fact that both the …

Member Avatar for Ketsuekiame
0
695
Member Avatar for bleedi

Hey! I was writing my code, and just became wondering if I get a memory leak here. The program has a function which checks and creates a "Time" object, which simply includes integer values for hours and minutes. It returns the Time-object created to the main code. The thing is, …

Member Avatar for bleedi
0
183
Member Avatar for embooglement

I am building a simple script editor which I want to function like Notepad, but highlight the scripting language's keywords blue and comments green, like what most IDE's do. I've got my application to essentially match Notepad using the built in EDIT window's class name, but I cannot get specific …

0
84
Member Avatar for jess314

Hi all, So, I'm a real newbie at this, and I don't even know where to start really. I'd appreciate some help. I've downloaded Allegro 4.9 onto my computer (running Windows Vista), and I want to use it with Code::Blocks IDE. I've tried many a google search, but none of …

Member Avatar for jess314
0
294
Member Avatar for vu student

As-salaam-o-alaikum i hope all fine. a) What is Static Polymorphism? Write its alternative name with a simple example with code. b) What is Dynamic Polymorphism? Write its alternative name with a simple example with code. c) What is the main difference between Data Hiding and Data Abstraction? How we achieve …

Member Avatar for UsmanKashif
0
76
Member Avatar for web3
Member Avatar for daviddoria
0
269
Member Avatar for CanYouHandstand

Hi All I'm using the QClipboard class provided by Qt. I'm trying to create a QList that holds the last twenty items that have been copied. I am declaring the list as follows: [CODE] QList<const QMimeData*> *copiedList; [/CODE] I am creating the list as follows: [CODE] copiedList = new QList<const …

Member Avatar for Agni
0
197
Member Avatar for fullmetalboy

Hi everybody! I'm a newbie to C++ and I need some help to improve my skills in c++. *When you make input data "cafe monde" into a string variable, the variable only accept "cafe" and not the white space and "monde". What should I do to retrieve white spacem "monde" …

Member Avatar for fullmetalboy
0
138
Member Avatar for katokato

Im trying to learn c++ loops and structures with the c++ primer plus book. Here is the question no6: [url]http://books.google.com/books?id=zuyAIZ9ZIskC&pg=PA205&lpg=PA205&dq=c%2B%2B+primer+plus+programming+exercise+how+many+cars+do+you+wish+to+catalog&source=bl&ots=mbyXM-wZBZ&sig=o0nBYx-ZkCShRJztCVoFTy4S1eM&hl=en&ei=BqxQTMKVK4eosQPi_bynBw&sa=X&oi=book_result&ct=result&resnum=1&ved=0CBIQ6AEwAA#v=onepage&q&f=false[/url] My current code: #include <iostream> #include <string> struct car { std::string carname; int yearmade; }; int main(void) { using namespace std; int zero = 0; int vb2 = 1; int …

Member Avatar for katokato
0
150
Member Avatar for cgcgames

Hi everyone I am currently learning C++ and i am writing lots of small bits of code to get praticed in coding in C++. i am working on a user system atm which takes a signup from the user and puts it in a text file so the user and …

Member Avatar for cgcgames
1
88
Member Avatar for WASDted

DaniWeb plans to interview Bjarne Stroustrup, the designer and original implementer of C++ and the author of many books on C++. This is truly a treat and rare opportunity for us as a community to talk to the father of C++. As the new editor-in-chief of DaniWeb's News and Reviews …

Member Avatar for AuburnMathTutor
2
710
Member Avatar for alvaradoxon

im a computer course student and needs help about the program using loop and gotoxy. Where in we have to create a program that will display the image below. * ** *** **** ***** NOTE: The program will accept a value (an integer) for the length of the triangle. (The …

Member Avatar for AuburnMathTutor
-1
215
Member Avatar for mebob

When I tried to compile my code, I got this in the log: child 2136(0xD8) died before initialization with status code 0x1 *** child state waiting for longjmp *** child state waiting for longjmp Resource temporarily unavailable C:\Users\Collin\Desktop\Programming\Makefile.win [Build Error] [HW8P1Class.o] Error 2 This is the file that seems to …

Member Avatar for mebob
0
264

The End.