49,761 Topics

Member Avatar for
Member Avatar for syd919

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 …

Member Avatar for Ancient Dragon
0
412
Member Avatar for Ketsuekiame

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 ) …

Member Avatar for Ketsuekiame
0
300
Member Avatar for dadam88

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 …

Member Avatar for Kanoisa
0
105
Member Avatar for hanvyj

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 …

Member Avatar for hanvyj
0
211
Member Avatar for arjunaw

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 …

Member Avatar for arjunaw
0
173
Member Avatar for aladar04

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.

Member Avatar for cgcgames
0
321
Member Avatar for eg_ kar

i am a 2nd yr IT student. what are the suggested ways or projects for me to improve myself according to this field?

Member Avatar for ithelp
0
68
Member Avatar for ramilol

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, …

0
154
Member Avatar for mrnutty

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 …

Member Avatar for Rashakil Fol
0
866
Member Avatar for EdAtTheAirport

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 …

Member Avatar for EdAtTheAirport
0
118
Member Avatar for vbx_wx

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]

Member Avatar for Narue
0
74
Member Avatar for dadam88

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

Member Avatar for dadam88
0
89
Member Avatar for dchunt

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 …

Member Avatar for cgcgames
0
110
Member Avatar for miturian

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 …

Member Avatar for miturian
0
351
Member Avatar for lafayettejohnso

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 …

Member Avatar for Fbody
-1
161
Member Avatar for bobsta

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; ... …

Member Avatar for dusktreader
0
207
Member Avatar for PixelExchange

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 …

Member Avatar for PixelExchange
0
113
Member Avatar for Ndoom

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 …

Member Avatar for popin
0
451
Member Avatar for schaffino

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 …

Member Avatar for mike_2000_17
0
160
Member Avatar for indigo.8

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 …

Member Avatar for indigo.8
0
2K
Member Avatar for mchandler

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 …

Member Avatar for ithelp
0
110
Member Avatar for Web_Sailor

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 …

Member Avatar for Fbody
0
384
Member Avatar for camcam08
Member Avatar for coder05

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 …

Member Avatar for coder05
0
79
Member Avatar for hanvyj

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 …

Member Avatar for hanvyj
0
663
Member Avatar for heezay

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 …

Member Avatar for thelamb
0
125
Member Avatar for arshiyafatima

i have write a c++ progam psudocode on additon of two numbers and average of two numbers enterd from keyboard

Member Avatar for jasikamarshel
0
94
Member Avatar for gregarion

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; …

Member Avatar for jonsca
0
86
Member Avatar for pamelaanne05

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? :)

Member Avatar for soulcandra44
-3
192
Member Avatar for daudiam

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 …

0
38

The End.