49,761 Topics
| |
Hi, I believe this is my first posting to DaniWeb, so thanks very much in advance for your time! I have been doing some searching and I am not sure of a definitive answer to the following problem. I am attempting to make a class that can store a set … | |
I need to prevent my window from going minimized to tray when I click the Minimize-Button. I write in native C++ with additional use of DX10, DXGI, Direct2D and DirectWrite. I proceed the WM_WINDOWPOSCHANGING. But how did I know if its triggered from a Minimize-Button ( WM_SIZE is already too … | |
In my code, I am trying to open a directory of Solaris OS from Windows OS using FindFirstFile(). In Windows XP, the code is working fine but in Window 7 same code is not working. FindFirstFile() returns INVALID HANDLE in Windows 7 and GetLastError() return error code 50, which means … | |
Hi, I try to make graphic editor with buttons on the left and opengl window on right. Currently I have done it like two windows - opengl and that tool bar.But I want it to be in one window like in most of programs. I have looked for it for … | |
OK, what's wrong with this? [CODE=C++] int main(int argc, char* argv[1]) { //declare argc and argv to check command-line arguments string arg = argv[1]; //convert char to string if (argc == 2) { //test if arg was entered if (arg == "test") { //test if arg is 'test' printf("you entered … | |
Hey guys im having a bit of trouble with bubble sorting an array from a file... Basically what needs to be done is i need to read a text file into a struct array and then copy it into a new file after sorting it by a string field can … | |
[COLOR="Red"][I]Hey everyone, I've finally gotten my program to build with no errors or warnings and I can run it but it doesn't give all of the correct output. The Instructor provided my class with what the correct output should be and my program gets it partly right just not all … | |
Hello there! I'm new programming in C++, have been learning it for 2-3 months. Now, this uni assignment is working properly, but I'd like to read your advice on how to improve it. All comments are appreciated. Thanks! [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; const int … | |
Hi, I'm trying to do a hashing project using separate chaining. In order to do the separate chaining I believe I need to make a dynamic array of pointers to the linked lists. This is due to the fact the user can specify the hash table size at runtime. In … | |
Hello guyz !!! I came across this problem and I am still unable to come up with a good algorithm to solve this problem Problem : given, 1<=n<=1000000, and 1<=k<=9 , calculate the first and last k digits of n^n. for example if n=13 and k=4, then result : first … | |
[CODE]#include <iostream> #include <conio.h> #include <windows.h> using namespace std; char board[20][20]; void setBoard () { for (int j=0; j<20; j++) { board[0][j] = 219; board[19][j] = 219; } for (int i=0; i<20; i++) { board[i][0] = 219; board[i][19] = 219; } for (int j=1; j<19; j++) { for (int i=1; … | |
[code] cout << "Introduceti numele: "; // 1 getline(cin, firstname); cin.ignore(); p.setNume(firstname); cout << "Introduceti adresa: "; //2 getline(cin, adr); cin.ignore(); p.setAdresa(adr); cout << "Introduceti CNP: "; //3 cin >> c_n_p; cin.ignore(); p.setCnp(c_n_p); cout << "Introduceti seria si numarul buletinului: "; //4 getline(cin, serie); cin.ignore(); p.setSerienr(serie); cout << "Introduceti valabilitatea … | |
Hi people, I'm trying to match strings from a pattern containing[B] wildcards[/B]. Basically I need to be able to go through a stack of strings, and see which of them matches my pattern. Fx [B]My*.txt[/B] will match only one of these. [U]MyFile.txt[/U] [I]MyFile.php[/I] I'm aiming to end up with a … | |
Hi How can I protect/lock a drive from deleting files and format it ? Is there a way to hook a drive? | |
Hi, I am write code about stack[pop,push,overflow,underflow] but i think i have Mistake in underflow and overflow .. and how i can Enter any thing in my array .. like if i want to enter [$] or[xxxxx] whatever not only int if you can correct in same code >> [CODE]#include<iostream.h> … | |
Hello, I've got a pretty much burning question here. Its about BitBlt. I have a window that functions as a button but I wanted to do some markup on it. So I the added BS_OWNERDRAW style to the button, and wanted to BitBlt an image on it. I tried it … | |
If I this function: [CODE] void drawRect(int x1, int y1, int x2, int y2){ HDC screenDC = ::GetDC(0); ::Rectangle(screenDC, x1, y1, x2, y2); ::ReleaseDC(0, screenDC); } [/CODE] How would I clear the screen of the white rectangles ? Can I make them another color ? :) | |
I'm implementing my own hashtable class as practice, but I'm having trouble retrieving values from the table that were inserted from a file. When I do so from an array however, the program finds the values without a problem... I've tried modifying my hash function to adapt for any potential … | |
[CODE]struct piece { piece(){} piece(int spacs[][3]) { spaces = spacs; } int spaces[][3]; };[/CODE] /home/myname/Programming/C++/blokus1/game.hpp|11|error: incompatible types in assignment of ‘int (*)[3]’ to ‘int [0][3]' How can this be fixed? | |
Hy! I have a project and hav to submit it at 13 june. Can somebody help me to add "Search Code" in this code. Its a student class a data abt student. If i want to search student data printed as Name: Father name: Id: and other data like this … | |
Write a program that reads in a sentence of up to 100 characters and outputs the sentence with spacing corrected and with letters corrected for capitalization. In other words, in the output sentence, all strings of two or more blanks should be compressed to a single blank. I don't know … | |
I understand the concept of a binary tree. So I guess, for a programmer defined binary tree, is it basically a doubly linked list except your 2 pointers are your branches? | |
Hi guys, I am bringing a problem which I thought I had solved, but it has re-reared its ugly head. The problem is one of user input (I can hear you veterans audibly say "Aargh!"). I wish to remove serial numbers (of type string) from a set. To give you … | |
[B][I]wii anybody plz tell me that how can we count a char in file when it repeats;[/I][/B] | |
I have to write two arrays of 10 random numbers betwwen 1 and 25 then sort those two arrays in increasing order then make a third array that has all the numbers of the first two arrays in sorted order but no duplicate numbers in the third array. Here are … | |
Hi, I have to write a little game for school. I am new at C++, but I have to do it on SDI. My idea is to make something like this one: [url]http://scratch.mit.edu/projects/Dthen/3801[/url] I have some questions for you: 1. How to remove the status bar from Main Window of … | |
hi, i hv to do the inverse of a matrix by row elimination plz help | |
Hi fellas, This week in class (2nd week), we are learning about classes. Our professor has asked us just to complete one simple class with separate files. My problem is when I go to compile, I get errors stating my variables aren't "declared in this scope." As far as I … | |
So my goal for a project of mine, is to output the values of variables into their respected locations in PDF file. Where would I need to look to get started on this? Are there any library's anyone would recommend? | |
How would I draw something on the screen ? not the console window but the entire screen, preferably with the console minimised. Also, would it show up on a printscreen ? It better not :P What I want to do is create something like a layer on top of the … |
The End.