49,766 Topics

Member Avatar for
Member Avatar for salty11

In the display function when i output it shows multiple output for some agents, but i only want it to show the final one, how can i do this? [CODE]#include<iostream> #include<fstream> #include<conio.h> #include<iomanip> #include<cmath> #include<string> // Associating program identifiers with external file names #define in_file "data.txt"//input file name #define out_file …

Member Avatar for salty11
0
547
Member Avatar for Mafiasays

Im having an issue with making a few test to overload the == operator in my linked list stack. i have the standard header files containing pop push and so forth. But Im having a problem writing these test. i was thinking maybe a test that would copy the stacks …

Member Avatar for Mafiasays
0
385
Member Avatar for Romil797

I have VS 2008, and QT. I wanted to know if I could include the .NET Framework and QT Framework in one application. How do you do this? Help!

Member Avatar for Ancient Dragon
0
68
Member Avatar for thedonflo

I am having trouble ascending and descending an array with an insertion code. I know the while loop displays it in ascending order but i cannot get it to display from the original, ascending or descending. It just keeps repeating the first element in the array. Any help will be …

Member Avatar for thedonflo
0
102
Member Avatar for Ravenn

hi:) i'm writing a windows form program that controls 4 stepper motors, using visual studio express 2010, c++ i'm using a for loop that has to cycle for up to 1200 times. it works well enough but it's kinda slow and, when it's connected to my hardware and given more …

Member Avatar for jonsca
0
253
Member Avatar for globberbob

Hey there, working on a program thats going to have a bunch of functions, but for now I am stuck on something that will be reused throughout the program alot: passing a string pointer to a function. It may seem redundant or arbitrary that I am passing it as a …

Member Avatar for globberbob
0
7K
Member Avatar for sdr001

Hello my problem is that I am not for sure my vector < vector < string > > addresses; is correct. What I am looking for is to read in from a file which looks like: name:dfsd@msn.com name:dfsd@msn.com name:dfsd@msn.com Once my code parses through the file, addresses should look like: …

Member Avatar for sdr001
0
185
Member Avatar for jowana

Hello, How can I calculate the normal vector giving a vertex on a 2D plane in OpenGL. ? All what I read was all about 3D and cross product of two vectors. the only thing that I have is that vertex and I want to construct a vector coming out …

Member Avatar for jowana
0
115
Member Avatar for Loaded Scissors

Hiya, I'm pretty new to C++ (using bloodshed dev). I am trying to display the path of a projectile (tennis ball) on a graph. I can do all of the calculations and output to a text file at each point however I can't find anything on the internet to explain …

Member Avatar for triumphost
0
202
Member Avatar for mushahidh

Implement Quick sort algorithm with partition of 3 elements, partition of 5 elements, partition of 7 elements, partition of 9 elements and partition of 11 elements for the data set of 10000 elements. Can anyone tell me what is meant by "partition" in the above?

Member Avatar for rubberman
0
173
Member Avatar for flowerzink

Hello guys! I'm having a rather pesky problem working with fstream. I could write, for example: [CODE]fstream file("text.txt");[/CODE] then file should be open in read/write mode. But then if I do the following: [CODE]file << "Some text"; file >> string_var;[/CODE] or in the opposite order, it will only perform the …

Member Avatar for Ancient Dragon
0
166
Member Avatar for mark103

Hi guys, I would like you to help me. I have figure out that I will get the errors of 'Form2' : undeclared identifier as if I included the "#include Form1.h" on the top of the Form2 class while I have the "#include Form2.h" on the top of the Form1 …

Member Avatar for Ancient Dragon
0
98
Member Avatar for geekme
Member Avatar for mike_2000_17
0
163
Member Avatar for thunderbird24

hi everyone! this is my encryption routine (using standard call) in x86 Assembler __ASM{ encrypt: push ebp mov ebp,esp mov eax, [ebp+8] mov ecx, [ebp+12] push eax and eax,0xAA not al mov edx,eax pop eax and eax,0x55 xor ecx,edx xor ecx,eax rol cl,1 rol cl,1 mov eax,ecx sub al,0x20 pop …

Member Avatar for rubberman
0
264
Member Avatar for shauzi158

People, i have downloaded a game cod from the internet and it wont run.. it always gives a linker error and i don't know what to do. i am new to allegro game development and i really need help.

Member Avatar for rubberman
0
75
Member Avatar for TailsTheFox

Hello, I'm looking for an easy way to wait for a keypress in a non-gui application. Example: I press A, program says "You pressed A" I AM NOT LOOKING FOR STRINGS AND ENTER! THIS NEEDS TO WORK FOR THE ARROW KEYS!

Member Avatar for rubberman
0
104
Member Avatar for frenzra

how we write array for dis problem: int movie title; int no of customer ; int no of day ; double ticketprice ; double drinksprice ; double studentprice ; anyone knows??

Member Avatar for frenzra
0
111
Member Avatar for jimJohnson

I am trying to finish this palindrome program and the only output I get is output cannot be found. Can anyone show me what I am doing wrong. I will put the instructions in if needed for a guide to show what it needs to do... [CODE] #include <windows.h> #include …

Member Avatar for abhimanipal
0
173
Member Avatar for codeyy

I am trying to write pop() function in a file but I am really stuck. It looks like it is asking to delete the top element of the stack and returns a Bookmark pointer. Please, help!! I am showing the header which explains what needs to be done. [CODE]#include "Bookmark.h" …

Member Avatar for Narue
0
164
Member Avatar for sergent

C:\Users\Kostya\Desktop\c++\MacroWriter\ifexists.cpp|27|error: ambiguous overload for 'operator=' in '((farm*)this)->farm::sendeachbase[i] = 0'| Ok so I am making a class for my program and I want to initialize some of its variables to 0's. I haven't done anything with classes for a while so I am not good with this stuff. This is my …

Member Avatar for mrnutty
0
253
Member Avatar for SWEngineer

I'm new to [B]Qt[/B]. What resources do you recommend for learning Qt? Thanks.

Member Avatar for SWEngineer
0
230
Member Avatar for Kunal Aggarwal

I have a external chr file which borland graphics (BGI) use in the C++ compiler. The question is how do I use the font..? Do i need to register it with the BGI graphics driver or something, if yes, how?? I am using TC 3.0

0
78
Member Avatar for sha11e

When writing this: [CODE] #include <iostream> #include <iomanip> using namespace std; int main() { float number = 2.12345; cout <<fixed <<setprecision(3) <<number; return 0; } [/CODE] I get 2.123 If I then cout another float variable that I want all decimal numbers at, and not setprecision(3)...... How do I do …

Member Avatar for sha11e
0
3K
Member Avatar for Drakswan

Hey there , I have a problem about saving information, which is read from a text file, to an char array.I have to read the file character by character.I could't use getline() function and string, I have to use get() function.There is a sample of the all data : " …

Member Avatar for Ancient Dragon
-1
1K
Member Avatar for C++NewBe

Based on my header file. How would I write a complete definition of the function temp (). [CODE]const int MaxDays = 31; // Maximum number of days in a month const int MaxTimes = 5; // Maximum number of times temperature is measured in // a day plus one column …

Member Avatar for VernonDozier
0
136
Member Avatar for tc121091

Here is the question : [URL="http://www.sendspace.com/file/qu6bpi"]http://www.sendspace.com/file/qu6bpi[/URL] I upload the code to my school checking system, and it said that I can only pass 6 hidden cases out of 10. I don't know where the problem is. :'( [COLOR="Red"]Here is my code :[/COLOR] (can only use looping,if,array,pointer) [CODE]#include<stdio.h> #include<math.h> #define N …

Member Avatar for VernonDozier
-1
89
Member Avatar for sdr001

Note: vector < vector < string > > addresses; I am having a problem with this line of code: addresses.push_back(addy.c_str); I am trying to push back an email address in the i location of the 2-d vector. I have tried: addresses.push_back[(addy.c_str)]; and addresses.push_back[i][(addy.c_str)]; but nothing is working >:/ I appreciate …

Member Avatar for sdr001
0
161
Member Avatar for Bastiondar

Is changing the currentLoc variable with an [B]IF[/B] statement a bad way to terminate this loop below? I'm told: [I]"...something in the loop body must cause the expression to become false at some time. One of the things you do not do ever, is write an if statement to change …

Member Avatar for Bastiondar
0
351
Member Avatar for TheWolverine

Hi all, I've setup a class within my software package to read generic text files. For this, I'm using the getline( ) function and then parsing each line for specific types of files. In setting this up, I've come across the ACSII incompatibilities between Windows systems and Unix systems. I …

Member Avatar for mike_2000_17
0
386
Member Avatar for bleedsgreen33

I'm working on a simple recursion function that takes a number and then adds the digits together, say 12345 = 1+2+3.....=15 I have that part: [CODE] int DigitSum(int number, int sum){ //if the remainder of the number / 10 is 0, return the sum if(number % 10 <= 0){ return …

Member Avatar for Fbody
0
139

The End.