51,593 Topics

Member Avatar for
Member Avatar for Aarowaim

Hey,I've been dabbling in programming for about a year and a half now, and I understand pretty well how to use the basic commands and such, although I still have to refer back to a documentation on some libraries to fix problems, but I have begun to effectively snipe out …

0
121
Member Avatar for Zvjezdan23

I am trying to make a simple calculator for my code and I wanted to know, how can I have the user input a number like c++ cin >> number; and then just have my math functions do the rest. I have this so far... [CODE] public static void Main() …

Member Avatar for Zvjezdan23
0
130
Member Avatar for qbunia

I`m having serious problem. class Set { Point_<int> point; int val; double *module; }; Mat m; Set s; m.push_back(s); It says see reference to function template instantiation 'void cv::Mat::push_back<Set>(const _Tp &)' being compiled When i add <Set> after push_back it brings me: see reference to class template instantiation 'cv::Mat_<_Tp>' being …

0
34
Member Avatar for techlawsam

So I was looking at this problem , and in monodevelop (and Visual Studio). But for somereason I keep getting unreachable code or error in Visual Studio, I retyped and relooked over my code but I cant seem to find what the mistake is that I can run my code. …

Member Avatar for nick.crane
0
244
Member Avatar for ziyadgodil

i hav car racing program in c++ and i wish to convert this program in c what i do? prigram is this...... [CODE] #include <iostream.h> #include <dos.h> #include <graphics.h> #include <conio.h> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <ctype.h> class car { private: int x1,y1,x2,y2,col,col2,col3; public: car():x1(200),y1(300),x2(270),y2(200),col(4) {} car(int a,int …

Member Avatar for Taywin
0
570
Member Avatar for george08.08

Hello. I am trying to validate a customer number using isdigit. If the user accidently enters a character other than an integer, I want it to allow the user to try again. The problem is it only will check the first number and if that is a digit it it …

Member Avatar for george08.08
0
3K
Member Avatar for niyasc

Source code implemented by [B]Niyas C S2C PPMHSS Kottukkara Kondotty Malappuram Kerala St India[/B]

Member Avatar for ziyadgodil
-4
10K
Member Avatar for johans22

I like to be able to modify the content of "pBuf" without modifying the content of the file. what would be the options, if that would be possible at all?. pBuf = (LPTSTR) MapViewOfFile(hMapFile, // handle to map object FILE_MAP_ALL_ACCESS, // read/write permission highDWordVal, lowDWordVal, BUF_SIZE1); //BUF_SIZE);

Member Avatar for johans22
0
82
Member Avatar for Jared1337

I've been working on this code for the past couple of days, and probably just need a fresh pair of eyes to look at my code. I almost have the triangle with spaces solved, but it looks like this: -----* -----** -----*** -----**** -----***** instead of what i want it …

Member Avatar for Eagletalon
0
1K
Member Avatar for vrs1155

friends i am learning visual c++ 6.0.i need to know how to connect the database(oracle).can you tell me how to do??.give me some example.... mfc application connect to oracle database,any example ??? thanking you

Member Avatar for Ancient Dragon
0
466
Member Avatar for Superandomness

Hi there, I'm making a simple C++ calculator. I want it to work something like this sample run: Begin Calculations 10 S // Set Accumulator to 10 = 10.000000 // Contents of Accumulator 2 / // Divide by 2 = 5.000000 // Contents of Accumulator 55 - // Subtract 55 …

Member Avatar for Superandomness
0
177
Member Avatar for sandman64

Here's the problem: Write a program that produces a bar chart show the population growth of Prairieville, a small town in the Midwest, at 20-year intervals during the past 100 years. the program should read in the population figures (rounded to the nearest 1000 people) for 1900, 1920, 1940, 1960, …

Member Avatar for Chilton
0
190
Member Avatar for s.tay

Hi, I am required to convert an Array Type DOUBLE to INT, for ease of plotting a graph. Fairly new to programming and unsure how to go about this. Any ideas appreciated

Member Avatar for NathanOliver
0
453
Member Avatar for oscargrower11

I've made a simple function that takes a vector as an argument. If the vector is empty, it throws a domain_error (I've included stdexcept). I'm feeding it an empty vector from the main loop just to learn try...catch statements and when it catches the error, it's supposed to print something …

Member Avatar for oscargrower11
0
166
Member Avatar for Superandomness

I have a string that has a ton of random characters (pulled from a webpage). I want to pull all of the numbers, commas, hyphens, periods, and percentages from the page and put them into a text file. I'm new to C++ so I'm not sure how I'd go about …

Member Avatar for Superandomness
0
229
Member Avatar for rjcenteno

looked everywhere, but all the information i find doesn't explain clearly on how to do this. im not sure how to store char* tokens[...] into an array where i can manipulate them. when i try storing tokens into array by: shapes[n] = tokens[n]; and when i try to print out …

Member Avatar for thines01
0
126
Member Avatar for Labdabeta

How do I do 2D opengl? I need to be able to put stuff up on the screen so that it is not rendered in three dimensions, and I need the 3d stuff to still be 3d behind it.

Member Avatar for Labdabeta
0
153
Member Avatar for Anirudh Rb

How do I check whether the data members of two objects belonging to the same class are equal? Will the following code do or is it done in some other manner?? [CODE=C++] class Sample { int a; public: S(int x) { a = x; } int getA() { return a; …

Member Avatar for Fbody
0
78
Member Avatar for johnnyboyslim

I am just trying to load a data file into an array and display it. I run it and nothing comes up on the screen. Are my arrays set the right way and set to be output the right way. Please let me know what I am missing. int main() …

Member Avatar for metronomu
0
145
Member Avatar for dileeps

While Getting the message WM_DEVICECHANGE ( either device arrival/romal (DBT_DEVICEARRIVAL/DBT_DEVICEREMOVEPENDING....), how we may able to get the device name like KingstonDataTraveler_2.01 PDEV_BROADCAST_HANDLE pDBHandle =(PDEV_BROADCAST_HANDLE) lParam; if(pDBHandle->dbch_handle !=INVALID_HANDLE_VALUE) { STORAGE_PROPERTY_QUERY query; DWORD cbBytesReturned = 0; char buffer [10000]; memset ((void *) & query, 0, sizeof (query)); query.PropertyId = StorageDeviceProperty; query.QueryType = …

Member Avatar for 5ophie2012
0
246
Member Avatar for gerard4143

I'm really new to C# so this may seem like a novice question..How does C# accomplished passing a reference to a object reference? I'm really trying to understand the underlying mechanisms and how it applies to the attached code with the comments - //what happens here? Do we pass a …

Member Avatar for Ketsuekiame
0
262
Member Avatar for johnnyboyslim

I have a sample program that shows how to load data into an array but I need to change it to sort movie titles into columns for movie title, length,year, media type from a file named movies.dat It asks first from where to load...then loads in no particular order...then sorts …

Member Avatar for metronomu
0
478
Member Avatar for Stefano Mtangoo

Hi, I know of two curl and libtorrent but I was just doing a study on what library/component/whatever you call it, is famous among download managers. I could not get information on FreeDownloadManager, Flashget, Multiget, DownloadThemAll et al. Would you help me find what libraries do these use, especially for …

Member Avatar for Stefano Mtangoo
0
239
Member Avatar for werdna347

I require a survey c++ program. The requirements are that it must do the following: It must first the user what they would like to do: 1.Complete the survey and writing it to a file, averaging some results and then quiting 2.Read the survey results from the files (password protected) …

Member Avatar for Stefano Mtangoo
0
146
Member Avatar for robdb

I have to write an application in which a text file is read and stored in a vector of strings [CODE]vector<string> text;[/CODE] After that I have to compare each character of text loaded from a file with an array of char with default content [CODE]char ARRAY[21] = {... ... ...}[/CODE] …

Member Avatar for robdb
0
2K
Member Avatar for akhimv88

Which is the best book to study more about windows programing(using windows.h heder file in cpp).Please give the details of good text to study the MSDN API s. thank you.

Member Avatar for Ancient Dragon
0
18
Member Avatar for vegaseat

You can access the sound chip to play midi voices using winmm.lib, or in case of Dev C++ the libwinmm.a library. There are 128 midi voices to pick from, anything from the Acoustic Grand Piano = 0 to the Gunshot = 127.

Member Avatar for moxy
3
3K
Member Avatar for AshfaqueIW

Hi all, I am receiving the keyboard read/Terminate command from the client(PC) to the Board(Windows CE) through Serial Interface. I need to terminate the character reading from Keyboard if i receive Terminate Command. Termination/Continuation is been handled inside a thread. But whenever Terminate Command comes Character reads are continuing till …

Member Avatar for Ketsuekiame
0
112
Member Avatar for Zssffssz

Sorry about all the posts; found time and have found time to do programing. Ok I want a usual console application to make a Win GUI window saying thanks at the end of the console app how would I do this eg: [CODE]#include whatever Using namespase std; // what does …

Member Avatar for Ancient Dragon
0
151
Member Avatar for Zssffssz

How would I togle casp lock in a c++ program without the key; I want my keybord to look haunted(the casp lock button has a light on it : )

Member Avatar for sundip
0
99
Member Avatar for fsefsef23

We just started discussing stacks and queues in my class, and our teacher left us with some questions to answer. I got all of it done except for the last question, which I honestly just can't understand, and am wondering if there is something about stacks that I'm missing. Here …

Member Avatar for mike_2000_17
0
223
Member Avatar for tomtetlaw

I'm trying to develop a pixel shader that allows me to input colors to directx in a 0-255 range for each chanel, and it will convert it to the 0-1 range that pixel shaders need to return, but the input to my pixel shader is sometimes being clamped to 255 …

0
93
Member Avatar for Jared1337

I've messed with this program for awhile, i can't figure out how to make any of the other triangular shapes beyond the first one i have. Also there's a diamond that i am supposed to make, and a triangle with spaces in the problem. Can anyone help me re-construct my …

Member Avatar for Jared1337
0
150
Member Avatar for Labdabeta

Quick question (though I still want to get my long OpenGL question fixed) is there a faster way to Xor the bits of an integer than this: [CODE](MyInt&0x1)^((MyInt&0x2)>>1)^((MyInt&0x4)>>2)//etcetera[/CODE] Just to clarify by faster I mean faster to execute, not to type as this operation will have to be done many …

Member Avatar for murnesty
0
100
Member Avatar for jigglymig

need some help with the friend function that overloads the << operator heres my code thus far.... [CODE]#ifndef PRODUCT #define PRODUCT #include <iostream> using namespace std; class CProduct { private: int productID; // 5-digit product ID number int manufactureID; // 4-digit manufacturer's ID double price; // wholesale price double markup; …

Member Avatar for jigglymig
0
239
Member Avatar for meli123

heyy all..I am really confused on the MOD (%) operator and how it is processed.. [CODE]int n; cout << "Enter n: "; cin >> n; for (int i=1; i<=n; i=i+1) if ( (i % 2) == 0) //even cout << "-"; else //odd cout << "^"; [/CODE] What exactly is …

Member Avatar for NathanOliver
0
92
Member Avatar for RideFire

Here is my question that I can't manage to google and solve. I wrote a simple C++ program that adds two numbers. However, how do I call an assembly code to do this addition. It will be easier to show what I have so here it is. Here is my …

Member Avatar for raptr_dflo
0
236
Member Avatar for Zssffssz

I herd that some C++ compilers can use asembly languige in there programs along side C++, How would I do This? And is there any way to use a compiler as an assembler? <<two questions.

Member Avatar for gerard4143
0
181
Member Avatar for Zssffssz

Ok google was/is no help in this sittuation; are there any alternarives to these the thing they do and current function is listed please say if rhere is an alterative as most of these seem to dislike me or are in a libray and code::blocks has a problem with librarys …

Member Avatar for Zssffssz
0
92
Member Avatar for Pikachumanson

Ok I have an assignment for school where we are building a compiler step by step each week. This week I have to make a syntax analyzer that picks out the errors from this text file below. In the source code I have provided below I have a lexical analyzer …

Member Avatar for chocolaver
0
2K
Member Avatar for edchem9

Hello guys i need your help to finish my project in computer programming so guys i need your help problem: the new telephone company has the following rate structure for long-distance calls: a. The regular rate for a call is $0.40 per minute b. any call started after 6:00 PM(1800 …

Member Avatar for Anirudh Rb
0
173
Member Avatar for robdb

the program must read a text file, encrypt the content and then rewrite everything to a text file. compile ok, it crashes while running and still produces an empty output. how can I fix this? vigenere.h [CODE] #include <string> using namespace std; class Vigenere{ private: string key; string text; static …

Member Avatar for robdb
0
378
Member Avatar for jyothi Mocherla
Member Avatar for Harley_Quinn

So I have this code that has a sum function that sums n elements in a vector [CODE]#include <iostream> #include <vector> // need this in order to use vectors in the program using namespace std; void computeSum (vector<int> &Vec, int howMany, int total, bool success) //the computeSum function that will …

Member Avatar for Fbody
0
193
Member Avatar for hdan

Hello! I want to make a trainer (just for that not because I need to cheat at a game). I have an application made by me (Untitled1.exe......ftw!) when I press any key it makes the number from x to x++... Another program I need is when I run it to …

Member Avatar for chochang262
0
901
Member Avatar for XodoX

Ok, I've asked something similar before, but I still have not been able to understand this... so I just want to have a txt file with math operations in it. Basically, it's just integers multiplies and added. Nothing else. 1*5+10 10+12 Each line can contain any multiplication or addition. The …

Member Avatar for Anirudh Rb
0
142
Member Avatar for Sen

I tried to test Nehe's lesson 6 project. After I copied and pasted the source code, I compiled it and got the result below; ------ Build started: Project: TugasOpenGl2, Configuration: Debug Win32 ------ Compiling... Tugas2.cpp c:\program files\microsoft sdks\windows\v6.0a\include\gl\glaux.h(17) : warning C4068: unknown pragma c:\program files\microsoft sdks\windows\v6.0a\include\gl\glaux.h(374) : warning C4068: unknown …

Member Avatar for Djubiona
0
581
Member Avatar for meli123

I would like to make a program which allows you to enter a number (say 145). It reads the 3 CHAR and prints the largest one. I can make it to compare integers but where I am lost is how to compare characters in a single 145 (example) input so …

Member Avatar for TrustyTony
0
297
Member Avatar for wazzer225

Hello just curious, I know that i'm supposed to use new in c++ but decided to experiemnt with malloc. Can you explain to me why the following code crashes and what is the reason. I was under the impression that the size of vector is fixed as it just stores …

Member Avatar for Stefano Mtangoo
0
4K
Member Avatar for stevanity

Is there anyway to run a Java program through C/C++? (i.e.) When I run the C Program, the program must start and it must inturn run a java program and display its output... Im not talking about using Native interfaces and all. Not code interoperability. Just run the java class …

Member Avatar for stevanity
0
220

The End.