49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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). … | |
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 … | |
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 … | |
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() … | |
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 … | |
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: … | |
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; } … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
| 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 … |
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 … | |
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 … | |
I want to make a 3D game and I don't know what to use OpenGL or SDL? | |
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 … | |
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" … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.