49,761 Topics

Member Avatar for
Member Avatar for PaladinHammer

Hey guys, pretty confused about what a "pass-by-reference" function is and does. No one will put it into simple English for me and Google has become my worst enemy on the topic. What the Program has to do is convert the five-numbers of a zip code (for example: "64110") into …

Member Avatar for PaladinHammer
0
150
Member Avatar for rpcraig

I have an existing library called libt1.so which has a class definition in it I will be using. I would like to create a new shared library out of an object file called AddNumbers.o that creates an instance of a class in libt1.so. So essentially my question is: How do …

0
9
Member Avatar for saleem123

I want to make a program which ask the user to enter double values and stores it in a file. The inputs process ends when the user enters cntr+d. Can someone suggest how to do it ? i wrote the following code but it doesn't work ! [code]ofstream file("test.txt"); double …

Member Avatar for sidatra79
0
101
Member Avatar for mathrules

I am writing a program that reads in from a file (60,000) words. I think I got my code figured out except for the getline part. I will show you what I have ...what am i doing wrong with the getline part? [code] [code=c++] #include <iostream> #include <string> #include <fstream> …

Member Avatar for sidatra79
0
194
Member Avatar for u3mo

I'm running this code in Visual C++ 6.0 and it won't run correctly.. need some expert help.. I don't know what's wrong with this code.. Thanks for the help in advance.. [code=cplusplus] # include <iostream> using namespace std; int main() { char one, two, answer; do { system("cls"); cout<<"\n\n\t\tSelect a …

Member Avatar for chococrack
0
112
Member Avatar for lllllIllIlllI

Hi Im pretty new to the whole C++ programming language but after learning python and java i decided to give it a go. I have been using tutorials at [url]www.cplusplus.com[/url] and that has been working fine but i came across a bit of code today i couldn't understand. It went …

Member Avatar for lllllIllIlllI
0
141
Member Avatar for Se7Olutionyg

[CODE]// program 5: implement a decision structure for the following computation # include <iostream> using namespace std; //function used void instruction (); int main () { int income, tax,total; instruction(); // get the income cout << " input your income : $" <<endl; cin >> income; if (income <= 15000) …

Member Avatar for Se7Olutionyg
0
107
Member Avatar for koman

Ok so the code makes the user type in a number. Ok if the number is odd it must say "Invalid Input". If the number is EVEN it takes the ODD numbers of it and gives you the pairs that add up to the EVEN number. For example if I …

Member Avatar for Salem
1
108
Member Avatar for Ellisande

So for my project I'm working on, we have to simulate a game of Sorry. There are 1-4 players who are each represented by a color. Player 1 is always BLUE, 2 is YELLOW, 3 is GREEN and the 4th player is RED. Each color has it's own unique start/home …

Member Avatar for ST865
0
111
Member Avatar for panpanf

I am studying c++. I have many questions about the layout of classes and compile of template, etc. I know these questions are concerned with compiler, but i don't know any book about the deep principle and design of some c++ compiler. Anyone can give me a suggestion?

Member Avatar for panpanf
0
102
Member Avatar for haw_x2

Hello~ I am doing my Final Year Project in my university about p2p video streaming. Since we have to write custom directShow filter so we have to write streaming using c++. I only know basic c++network programming. (1)I would like to know if there is any source code available on …

0
69
Member Avatar for dmanw100

I am writing a program using strings to pass messages into SDL functions. For some reason the compiler will not let me create any string objects though. I get a 'string' undeclared error when I try to compile this code: [CODE]#include "SDL/SDL.h" #include "SDL/SDL_ttf.h" #include <string> int errorMessage(int errorNumber) { …

Member Avatar for dmanw100
0
153
Member Avatar for sladesan

Hi i am new to C++ I am have a error like the one above: on a linux working in the termial commands c++ round.cpp -lpthread -o moo.exe -- build file ./moo.exe -- running file get *** glibc detected *** ./moo.exe: free(): invalid pointer: 0xb7f226ec *** then shows ======= Backtrace: …

Member Avatar for stilllearning
0
167
Member Avatar for alin_yuhee

i'm trying to make a geme with c++ but i can finish it because i have trouble with the code :( .....this is the code of the game that i want to make.... [code=cplusplus] #include<iostream.h> #include<conio.h> #include<graphics.h> //using namespace std; int main(void) { double pos_x,i_pos_x,pos_y,i_pos_y,vel_x,vel_y; double time,gravity ; //t=time,g=gravity int …

Member Avatar for alin_yuhee
0
114
Member Avatar for lanilonzo

I am trying to put a multimap inside of a separate class for easy lookup of objects downstream in another main code that I am trying to access. If I put the multimap inside of my main routine and insert items from there it works fine. The second I move …

Member Avatar for stilllearning
0
68
Member Avatar for jkun2

I have this program to read in a text file and store each word in a Binary Search Tree and keep track of the frequency of this number in the file. My outputFile should read like: 32 a 54 and 4 hello 8 will 9 would I have the program …

Member Avatar for stilllearning
1
1K
Member Avatar for Liszt

When writing a timeformat in a textbox using the event _TextChanged and when timeformat has reached the written format "HH:MM", the ->RunWorkerAsync() command should execute and create a file but it seems that the backgroundworker does not execute the code inside. I wonder why this is not happening, have I …

0
57
Member Avatar for uscuba2_2001

I need some help. I want to have a circle arching/dropping but I do not get loop that I need to use. How do I do this? { AppWindow Win; Setup(Win, 0, 0, 600, 600); SetText(Win, "Ball Drop"); SetDrawColor(Win, 0.0, 0.0, 0.0); Circle(Win, 175, 175, 15); Sleep (100); SetDrawColor(Win, 1.0, …

0
32
Member Avatar for Liszt

With the code below I want to execute a task if the day is saturday and if the minute is >= 14. There is 2 things I wonder here. The code below is an infinite loop that never stops. So it checks for if this criteria is true but when …

Member Avatar for Liszt
0
175
Member Avatar for JimD C++ Newb

Hello, all! I'm getting an error that I don't understand, and would greatly appreciate some other input from somebody more experienced than me! So here's the problem: I have a tree that I can put nodes on, take nodes off, search, etc etc. I have one last function that I …

Member Avatar for chococrack
0
125
Member Avatar for guest7

Hi, I am getting the following error: test.o(5209) malloc: *** mmap(size=2097152) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug I am using finite recursive function in my program. Please help with my query. Thanks

Member Avatar for ivailosp
0
87
Member Avatar for AcidG3rm5

Hi guys. I'm doing a programming, whereby I have to display a prompt of my own on the linux terminal. Example commandprompt>. The program will then wait for user's input, example "ls -ali | more" or "ls -ali" and etc. I will be using the following system call in my …

0
84
Member Avatar for sundar.mn

HI and hello, This is sundar...i'm posting a project that i've done 'Airline Reservation System'... Pls go thru it and let me faults if any...and also how to enhance this code.... (pls find attachment)

Member Avatar for Ancient Dragon
0
151
Member Avatar for gregorynoob

okay, so i came up with this idea of making a program to evaluate my code. it's supposed to take the code, compile it, run it on several test cases (given in one file each) and report how the code did (which test cases it passed, which cases it failed...) …

Member Avatar for Salem
0
233
Member Avatar for maori

Hi Guys is there a way to incorparate the ping function into a app what i want to do is when the user trys to connect it opens a window and displays 1, pinging "ipaddress" and if succesfull displays connecting to host ie "ipadress" from above but if no ping …

Member Avatar for maori
0
336
Member Avatar for killdude69

Ok, I have a DLL I made. In the DllMain function, I have a variable called my_var (const char[13]). I compiled the dll (called "WGCL") and put it in the debug directory of my Win32 Project. I used /DELAYLOAD:WGCL.dll to Delay Load the DLL which seems to be the only …

Member Avatar for Ancient Dragon
0
149
Member Avatar for scotchfx

I've got a question for all of the veteren C++ programmers out there.... I know that in_addr_t is a byte addressed value (representing an IPv4 address) however in debugging this code I was expecting a compile error ( scope of ipaddr declared in if statement would not extend to the …

Member Avatar for ArkM
0
82
Member Avatar for Khae

hi guys need help I resently just started c++ and on classes and have a project to print a tag to be attached on a luggage and deppending on wether the costomer want it delivered at home or pick it up at the airport. Plz find attachment

Member Avatar for Peter_APIIT
0
99
Member Avatar for Se7Olutionyg

Calculator should display the accumulated value after each operation [CODE] //FILE: PROGRAM3.CPP //AUTHOR : AM NGUYEN //COURSE NAME : CS210 //DATE : // DESCRIPTION : A SIMPLE CALCULATOR # include <iostream> using namespace std; void instruction(); int calculator (char); void divide_by_zero (); float do_next_op (char, float, float); void main() { …

Member Avatar for unbeatable0
0
86
Member Avatar for NinjaLink

Hello all... I'm having a few problems with my program. I will list the problems that I need help with.. 1) I need help printing out the highest testScore (I'm am getting garbage numbers) 2) I need help printing out the person's name in my input file who has the …

Member Avatar for NinjaLink
0
133

The End.