49,756 Topics
![]() | |
This is my code so far: #include <iostream> #include <cmath> #include <cstdlib> using namespace std; int main() { float numbers[15]; float sum, lowest, highest; float min, max, range, stDev, mean, median; int indexOfMin; float above = 0, below = 0; sum = 0; for(int testNum = 0; testNum < 15; … | |
Hi, First of all, i am not trying to hack into anything or anyones e mails. I am new software engineer and I need to log into company wiki page & download info displayed into a text file or something, so i can search for data i am looking for … | |
I have a button created as follows: ~~~ HWND License; HBITMAP MainButtons; Case WM_CREATE: License = CreateWindowEx(WS_EX_TRANSPARENT, L"Button", L"License", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_BITMAP, 26, 77, 75, 23, hwnd, (HMENU)ID_LICENSE, hInst, 0); MainButtons = (HBITMAP)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MAINBUTTONS), IMAGE_BITMAP, 0, 0, LR_SHARED); SendMessage(License, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)MainButtons); break; ~~~ … | |
Hello, I'm having trouble with something.. I have a vector of doubles and I need to convert the vector to an unsigned char so then I can write the contents to a text file. I can do this when reading the data from a text file, just not from a … | |
Hi gueys, I am programming a class compenent liberary in C++ CLR, but I have a problem with exception throwing. this is the code that call the exception: `throw gcnew ReadStreamException(Error);` and this is the exception class: public ref class ReadStreamException : Exception { ReadStreamException(String^ Message) : Exception(Message) {} }; … | |
I meant to post this in the C forum and not the C++ forum. Below is the link to a picture of the debug error window [url]http://www.flickr.com/photos/7629837...in/photostream[/url] It's a program that i'm doing and I keep getting this error here's a link to the programming problem. Its' Number 3 [url]http://books.google.com/books?id=bSy...%2B%2B&f=false[/url] … | |
Hi guys, I have been trying to implement the A* algorithm in C++ and would like to make use of the priority_queue structure to hold the open and closed lists of nodes. The problem is, all of the algorithms that I have found use the equivalent of a "search/contains" function … | |
I have an array of data of the form: union colour { unsigned int argb; struct{ unsigned char a; unsigned char r; unsigned char g; unsigned char b; }bigendian; struct{ unsigned char b; unsigned char g; unsigned char r; unsigned char a; }littleendian; }; struct sprite { int w,h;//stores the … | |
hi guys! today i tried file writing through VC++ 2010. suddenly a point stroke in my mind to create a file which may not be read by notepad or it gives error or some wrong output as it is mostly seen on opening a pdf file in notepad. for this … | |
I'm trying to clip my Button with the following code but it does not work at all.. #pragma comment(linker,"\"/manifestdependency:type='win32' \ name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") #pragma comment(lib, "Gdiplus.lib") void RegionCloseButton(HWND hwnd) { CloseRegion = GetDC(hwnd); CloseRegionMem = CreateCompatibleDC(CloseRegion); Gdiplus::Graphics graphics(CloseRegion); Gdiplus::FontFamily fontFamily(L"Courier New"); Gdiplus::GraphicsPath path; Gdiplus::PointF Origin(5, 5); path.AddString(L"X", … | |
Hey all i am trying to write a Min Heap program using that allows insertion and deletion. I have the code for what i believe is insertion, but i am having trouble trying to figure out code to heapify and remove from the heap. If possible could anyone lend me … | |
#include <iostream> #include<string> using namespace std; struct people { string fname; string lname; void input() { cin>>people.fname>>people.lname; } void output() { cout<<people.fname<<people.lname; } }; struct birthday{ int day; int month; int year; void output() { cout<<day<<birthday.month<<birthday.year; } void input() { cin>>day>>month>>year; } }; int i; int main() { cout<<"Birthday Program"<<endl; … | |
Hey all, I've been searching Rohitab, CodeProject and various other sites to figure out how to write OPCodes to a file and cannot figure it out. I thought I'd ask here because it's the only site I have an account on and I usually get my answers here or hints. … | |
Does C++ Console apps have a TryParse equivalent.. I mean .Net has it for both C# and C++ but why does C++ Consoles NOT have this! Or am I just wrong and cannot find it? I was thinking of writing my own with templates that can be use for ANY … | |
Write pseudocode and has the following; 1. It should write the guess secret number to standard output 2. It should ask yhe user if the secret number is higher, lower or if you guessed correctly 3. It should read the answer. Repeat the question if it is not one of … | |
Hi gueys, I have question searched in google but without something that can help. **How to get the binary stream from files ( especially executable files) using winapi (CreateFile , etc)????** I learned in these days how to read write files using Createfile, ReadFile, WriteFile , etc and all these … | |
Hi, I have a problem with a the imput of some data on a program Im making (FYI new in c++, homework). So basicly the progrma I have is to imput diferent type of data, this is what im doing. (Im using codeblock 8.02 in Ubuntu 10.04 ) #include <iostream> … | |
Hi guys, I am programming in C++ with NetBeans. It works fine when I playing with just one main.cpp file. But After I added an additianal class (1 .cpp and 1 .h), it makes an error even though I do not make any changes in the new files. (all I … | |
I'm not sure what i'm doing wrong, any help would be great. main.cpp(58): error C3861: 'preOrederHelper': identifier not found main.cpp(53) : while compiling class template member function 'void tree<T>::preOrderHelper(treeNode<T> *) const' with [ T=int ] main.cpp(9) : while compiling class template member function 'tree<T>::tree(void)' with [ T=int ] main.cpp(103) : … | |
I am trying to run chekstyle on all of my files within a project. So I have model, view, and controller folders all with their subfolders of .h and .cpp files. Is there any way to grab all the files that end in .h or .cpp without having to individually … | |
I am using code::blocks and have written a dll. I am currently testing it but am getting tired of having to compile it, copy the DLL, DEF, H and A files into a test project, and then compiling the test project every time I need to fix something. Is there … | |
I was just wondering why do we exactly call glTranste command if its possible just to increase objects x, y or z. And its even stated in this tutorial: http://nehe.gamedev.net/tutorial/particle_engine_using_triangle_strips/21001/ that its even faster to only use Vertex3f() instead of resetting the Modelview Matrix. Anyways, maybe its just something particular … | |
This code: DomainThingy^ thingy = (DomainThingy^)_scriptDomain->CreateInstanceAndUnwrap(Assembly::GetExecutingAssembly()->FullName, DomainThingy::typeid->FullName); Produces this error: System.InvalidCastException was unhandled Message: Unable to cast transparent proxy to type 'Hook.DomainThingy'. Does anyone knows how to fix it? | |
I need help with this code Constructer is abnormally called again n again.... add these file 2 a project n run ...i've given given constant messages in da code to explain the problem! Hit (1) two tyms i.e GetInput function in da menu.... u'll get 2 knw wat da problem … | |
Hello,I need to read a file containing 161 commands and store it in a vector of strings using vector_pushback and then print the 161 commands.Which is the best way to proceed with this ? | |
hi. i have some code in visual basic and i wrote some classes in c++ and i want make it dll but i don't know that when you use dlls it decreases the speed of process or not. thanks. | |
I have been programming in c++ for a while now, and i see the windows.h class is very handy on windows computers, where can i find a good tutorial for windows.h (winapi) (win32) programming. The ones i found so far either doesnt give you enought info on programming and some … | |
How can I have my program modify itself? Example: Size = 1mb ..Run program once.. size = ++1mb On Second Run, check if itself is 1mb Or something of the sort :S. I need to be able to check if my program has ever been ran before.. So.. Is there … | |
I am having an error that I can't seem to get past. The problem I get is an internal server error 500 when I try to run the C++ CGI script. here is my HTML document. I am using Apache Web Server. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> … | |
i need help in adding the c++ code for the average mark, highest mark, lowest mark, number of students passing, using array 01 #include<iostream> 02 using namespace std; 03 int main() 04 { 05 int gradeRange [4]= {0,0,0,0}; 06 int mark = 0; 07 int counter = 0; 08 09 … |
The End.