49,761 Topics
| |
helloz I am trying to make a program that calculates the distance between several cities and prints out the shortest distance of them all, the input will come from a textfile e.g 3 3 A 2 1 B 1 2 C 2 2 where the first two numbers are row … | |
Exact Message: [CODE="plain"]Error 1 error C3861: 'SHOWERROR': identifier not found[/CODE] My Includes: [CODE]#pragma once // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN #define SAFE_RELEASE(x) if( x ) { (x)->Release(); (x) = NULL; } #define SAFE_DELETE(x) if( x ) { delete(x); (x) = NULL; } #define SAFE_DELETE_ARRAY(x) if( x ) … | |
There is a easier way and more efficent way to do this with a for loop I believe...I can't put the nail on it can anyone help me out? I want to move a character around in a array...right or left or up and down with md arrays. [CODE] #include … | |
I have a curius problem with my bitmap writing function, it takes a char array and writes a 24 bit BGR bitmap. It was working fine using an array captured from a camera, I printed out the content of the first couple of bytes: 132 135 131 132 135 131 … | |
I have a class template (ExclusiveMap) which takes two type parameters C1 and C2 and declares two private members map<C1, C2> and map<C2, C1> (both STL maps). In test code I instantiate this class template providing types int and string for C1 and C2 respectively. The test code compiles cleanly … | |
I have attached the files. I think, there's a problem with listarr.cpp. I'm not yet good at c++ terminologies, please take time to download and see the files. I use dev-c. | |
i am a 2nd yr IT student. what are the suggested ways or projects for me to improve myself according to this field? | |
ok so im trying to use double buffer to make smooth animation but i can't get it to work here is the code for my drawing [CODE] VOID onPaint(HDC hdc,HWND hWnd) { HDC hDC=GetDC(hWnd); HDC memDC = CreateCompatibleDC(hDC); HBITMAP hMemBmp = CreateCompatibleBitmap(hDC,300,300); HBITMAP hOldBmp = (HBITMAP)SelectObject(memDC,hMemBmp); Graphics graphics(memDC); Pen pen(Color(255, … | |
Its a typical implementation of mergesort algorithm. It runs in a stable time of O(n*log(n) ). Just thought, I would add it to the library. Its been tested, although not very throughly, so if any bugs are found, just post it here, so others can be aware of them. Its … | |
Hey all. I'm a beginner. Please somebody tell me what's wrong with the simple use of my else statement. The compiler says: "Error. Expected a statement." [code] // IfDemo.cpp : Defines the entry point for the console application. // // demonstration of IF statement #include "stdafx.h" #include <iostream> using namespace … | |
I have to do this : define a float variable and take its adress,cast that to an unsigned char and assign to it to an unsigned char pointer: Why isnt this good ? [code] float f; unsigned char* c = static_cast<unsigned char>(&f); [/code] | |
I understand that bool means true and false. If I was doing a while loop... [CODE] while(!GAMEOVER) do all this... GAMEOVER = 1 or TRUE (loop exits) [/CODE] IS the above correct? And is there any other ways bools are used to help reduce clutter? Thanks, Derek | |
I put all the contents of an array a[16] into a file. But when i read them how can i separate those numbers from each other instead of adding a space. what about putting the contents into a new line like 0 14 1 24 How do i do that … | |
So, in advance, I have to admit that this is not quite as "good" a question as what is otherwise found here. It's not about a weird error, or something I can't figure out to do. I just get weird output. I've spent around 2 days simplifying the code, trying … | |
The positionOf() method, it is declared as private in the private section of the set class declared in the .h file. You define the method the exact same way you define public methods, in the .cpp implementation file for the class. The private means you can call this method from … | |
Hi, I am trying to simplify initialising objects from file and writing objects to file by overloading the "<<" and ">>" operators. I have two classes, a nesting class and the nested class, the latter comprising two floats. The nested class forms and STL vector [CODE]class beamlets{ float left,right; ... … | |
Hello everyone. I am trying to make a simple, one lined text field, which permits users to enter text into it. The text field I am reffering to is the type that has a carriage return blinker to signify that a user can type there. I have looked up "text … | |
Hi all, Welcome to Study Group 13 (SG13) ^_^ We are a group of people – mostly students – who are self-learners. We share the study materials (obviously online materials), help each other in debugging our codes, and give advice regarding programming or studying problems. Q&A: Q: What programming languages … | |
I have written two programs that encrypts and sends and decrypts and receives a text file in asm. The program works fine, the problem I'm having is setting up the com1 port. The transmitter sends the file fine, but the receiver cannot receive the file until i have set up … | |
Hey guys I'm having a little problem with unsigned char and reading a file of integers into the array. 1. What the program is suppose to do: It's suppose to dynamically create an array of unsigned char that is the correct size to read in the array of numbers. The … | |
I dont know much about software development so please forgive my lack of knowledge on the subject. I am looking to build a subscription based service for hair stylists that will include a website with appointment setting features. I have found some other really good appointment booking software that is … | |
Hi :) I am using basic replace function but getting some runtime error as below:- [CODE]terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::replace Aborted [/CODE] I already know the position where I should replace so don't need to find it. Can somebody tell me how to avoid this … | |
can anybody help me to call notepad in dev c++ | |
hi there, i am new user of C++. i have to write a code for my final year thesis work though my subject is naval architecture. I did my coding perfectly. But i need to take the result in excel file. the problem is ,using outfile command , the whole … | |
I am trying to write a char array to a bitmap in c++. I (think) i know what values I need in my file header and bitmap info header, and i have looked at some examples but I cant seem to solve this problem (i'm sure its something stupid) In … | |
So this is my first attempt with making a program and what i'm trying to do is make a program that retrevies profile information off xbox.com i.e avatar picture, name, location, etc... basically it would start with [url]http://live.xbox.com/en-US/profile/profile.aspx?pp=0&GamerTag=*[/url] and the * would be the variable now how would i put … | |
i have write a c++ progam psudocode on additon of two numbers and average of two numbers enterd from keyboard | |
Hey guys , i written a code to call another external program i wrote , but the problem i am having is i am unable to save the output into a variable. using namespace std; [CODE]int main() { const char r = system("samp -s1122") ; cout << r << endl; … | |
Create a c++ program that would translate words to numbers using if, else and switch statements only. The maximum number to be inputted is 999999999. All numbers should be integers. Those are the conditions. Help please? :) | |
Applications like browsers, etc. are written in Java, Python, etc. But when they are installed on a system that doesn't have Java or Python installed, how does it ensure that its code runs there ? Actually, I wanted to write a browser in Java with WebKit as engine. Since the … |
The End.