49,761 Topics

Member Avatar for
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
184
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
111
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
200
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
172
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
165
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
160
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
262
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
74
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
102
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
110
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
170
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
161
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
251
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
227
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
135
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
160
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
350
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
385
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
138
Member Avatar for GhostMonkey

I've been trying all day to write an array into a file but it doesnt work. The code I'm using is: [CODE] fstream myfile; myfile.open ("array.txt"); for(int i=0;i<=9;i++) { for (j=0; j<9; j++) myfile<<array[i][j]<<endl; } myfile.close();[/CODE] What am I doing wrong? This works if I knew what I was writing …

Member Avatar for GhostMonkey
0
102
Member Avatar for MarginOfBuffett

Whenever I try to compile my Song class I get a ton of linker error messages. I'm using the Dev-C++ compiler. Here's my code: //The header file [CODE]#include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; class Song { public: Song(); Song(string title, string artist, string album); void …

Member Avatar for Narue
0
257
Member Avatar for dyingatmidnight

ETA: okay take two, I thought I had the problem fixed, turn out no. Okay so I'm a student on work term teaching myself C++ coming from a background in Java, having done that for the past two years in school. I'm having a tough time with some concepts and …

Member Avatar for mike_2000_17
0
235
Member Avatar for eman 22
Member Avatar for trobinson6453

I need to create an integer array with 10 elements, write a function that will have the user enter the data. The function will return nothing and has 2 parameters, the array and the size of the array.

Member Avatar for ziggystarman
0
53

The End.