49,766 Topics

Member Avatar for
Member Avatar for Black Magic

Hi, im just bored so was mucking around on Dev-C++ and then was wondering - how could i make it so my program said a random sentance, like if i defined loads, and it said one at random. Could you help :).

Member Avatar for Ancient Dragon
0
80
Member Avatar for allialli

I have a class assignment of writing a program that: Start with the following program code. Write the function called "increment" which takes one integer parameter and returns that value plus one. [code=cplusplus] #include #include using namespace std; // YOUR FUNCTION GOES HERE! int main() { int input; string keepGoing; …

Member Avatar for bugmenot
0
244
Member Avatar for computer engW

Hi ; I know how to solve the same problem if i have limit numbers ,but here i have n intergers .How can the compiler understanst me when i need n integers ,like this question: [COLOR="Red"]Write a program that takes an n number of integers and calculates their average.[/COLOR] Using …

Member Avatar for computer engW
0
93
Member Avatar for digital_ice7

why cant it work properly??? [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main(){ ofstream out;//create output stream int acc_num[10]; for(int x=0;x<10;x++) acc_num[x] = rand()%10; //generate account number char acc_file[600]; for(int x=0;x<10;x++) acc_file[x] = acc_num[x] + '0'; out.open(acc_file, ios::out);//create & open output file out << "PACKAGE ID: "; …

Member Avatar for Nick Evan
0
106
Member Avatar for Suraine

i figure out that srand() and rand() are not quite good in creating a random number. for: [code]while(true){ int x = 0; srand((unsigned)x); int r = random(); cout<<r<<endl; }[/code] It gives back the same number. Am I doing something wrong? If not, is there anywhere that we can create our …

Member Avatar for vmanes
0
83
Member Avatar for veronicak5678

I am trying to write a "censor" program. here are the instructions: Write a program that reads a file of text and replaces each `target' word with its first letter followed by a string of asterisks that indicate its length. Have it read the list of target words from a …

Member Avatar for veronicak5678
0
185
Member Avatar for Yellowdog428

Wow, I am having huge problems passing values between functions and wrapping my head around pointers. For some reason when I tried to return values from functions they would not pass and when I tried putting pointers in the place, passing them kept giving me compiler errors. Now I have …

Member Avatar for Yellowdog428
0
97
Member Avatar for inamabilis

Hi, First off apologies if this is in the wrong forum - moderators feel free to move it if it is, or ask me to repost somewhere else. Now, my actual question is as follows. If I understand correctly by initiating a hook using SetWindowsHookEx then my hook will be …

Member Avatar for inamabilis
0
77
Member Avatar for WonderWomen204

I have to do an assignment for class. Here is what the assignment is: Start with the following program code. Write the function called "increment" which takes one integer parameter and returns that value plus one. [code] #include #include using namespace std; // YOUR FUNCTION GOES HERE! int main() { …

Member Avatar for Ancient Dragon
0
121
Member Avatar for infernojmd

my out put file comes out like 0105000011500970099001120011600108001 and so on for a while. any one help me figure out wat is wrong with my code. oh yea and what is in the input file is it-is a-CaPital Mistake tO-theorize Before-one has DatA123. [CODE=cplusplus] #include <iostream> #include <iomanip> #include <fstream> …

Member Avatar for Ancient Dragon
0
122
Member Avatar for cquestion

Hello: I'm almost killing myself to figure out the problem with the attached code. It seems that passing a text array to a function is impossible. Anyone is so kind to help me, please.

Member Avatar for Ancient Dragon
0
92
Member Avatar for starkman

Hey All! I am trying to implement a clutch like system in a little project I'm creating, Basically i am extracting information from a .csv file of the location of a users gaze whilst studying a standard desktop... I have the methods, MoveClickGaze, and MoveMouse, however i want to implement …

Member Avatar for starkman
0
103
Member Avatar for M&M

I keen to write a program that reads a text from a file. Then i have to take each word from the text and change the word. If the word begins with a vowel, add the string "yay" at the end of the word. If the word does not begin …

Member Avatar for Ancient Dragon
0
96
Member Avatar for DJ-KhaosTheory

Hello all, I have been working with the playsound() function in Visual Studio 2005, and find myself coming up short in getting it to work. I have recieved many compile errors, and never successfully have gotten it to function. I am using VC++ console application, WITHOUT a precompiled header. My …

Member Avatar for DJ-KhaosTheory
0
4K
Member Avatar for UnnamedPlayer

Hello I'm a newbie at c++ and I'm doing a basic course in school at the moment. I have an assigment which unfortunately is impossible to complete with my knowledge (that is how it feels like at the moment anyway :'( ) . I'm not looking for someone to do …

Member Avatar for vmanes
0
93
Member Avatar for mostafa mahmoud

Hi, I am a computer engineering Student having knowledge of basics in C++. I have to make a C++ project (pharmacy and its inventory). Please guide me how to make such an online project in C++. What all tools i need to use and how much time they will take. …

Member Avatar for Narue
0
102
Member Avatar for jasonlys

Hi I'm new to C++ and would really appreciate if someone could help me. How do you exactly put the friend function into this program? Not that I haven't tried. I really have no idea where to put and what to change. My program is grouped into three different parts. …

Member Avatar for Narue
0
86
Member Avatar for knewc

Hello mates! I'm having quite a bit of trouble reversing a set of integers using recursion. The user enters a positive integer. The program then takes that integer, and lists 0,1,2...Number originally entered. The function SumTo lists zero to N, however I now need to reverse that list. Like this... …

Member Avatar for ivailosp
0
248
Member Avatar for knewc

My Prof gave me this to work with.... the following function accepts an integer greater than 0, as an argument and it returns the sum of the squares of the numbers 1 through N. For example: squares(3) must compute the value 1^2 + 2^2 + 3^2, that is, 14. I …

Member Avatar for ivailosp
0
94
Member Avatar for mukulbudania

I am able to make a mouse... the show function and hide functions are working.. but i am not able to implement the left_button down properly... not even the right button down function.... is it like the left button down n click r equivalent.... can neone help me out with …

Member Avatar for Black Magic
0
113
Member Avatar for CE Student

This program I have to solve it before next week;so plezzzzz plezzzz help me And I will be very happy if I solve it :) :) ITCS102 Assignment #4(chapter 12) Create a class called BloodDonor that maintains information about blood donors in a blood bank having the following data members: …

Member Avatar for ivailosp
0
217
Member Avatar for johnnygaddar

Hi, I need to do this problem for an assignment. We have not focused very much on this topc and that would be great if someone could help me get started. I am not asking for a complete solution or anything, just to head me in the right direction. The …

Member Avatar for johnnygaddar
0
180
Member Avatar for poojaa

hi, i am developing a dll for comparison of 2 text documents in php through vc++, i find the techniques of comparison from diff eventhough while executing my code it shows an error ie, unable to open config.h. Can anyone help with it.

Member Avatar for Ancient Dragon
0
38
Member Avatar for LindaWiklund

Has anyone used GMarkupParser to parse a simple xml-file? If so, how do I use g_markup_parse_context_new () and g_markup_parse_context_parse ()? The Glib manual is completely incomprehensabel. To clearify, what I am looking for is a bit of code so I can understand how to parse an xml-file. Can anyone help …

0
75
Member Avatar for Adrian99420

Hi, I am using visual C++ 2005 express edition. I created a window form application with several combobox. The combobox contain few default items (pictures for example). Now I wish to create a file browser which allow user to choose picture from others directory and added it into the combobox. …

Member Avatar for mitrmkar
0
175
Member Avatar for DOrmisher

I'm currently trying to draw a bitmap to screen after a mouse click. This is the draw sprite function: [ICODE]void C_AlphaBlend::DrawSprite( int X, int Y, Bitmap* BitmapToDraw ) { int Width=BitmapToDraw->Width; int Height=BitmapToDraw->Height; for (int i=0; i<Width; i++) { for (int j=0; j<Height; j++) { Color colour = BitmapToDraw->GetPixel(i, j); …

0
56
Member Avatar for nurulshidanoni

I have this data..but something error..my data is like this... Exam TExam 1 25 2 20 3 46 4 56 5 12 but it only appear like this 1: -853617 [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for …

Member Avatar for nurulshidanoni
0
112
Member Avatar for nurulshidanoni

If I want to sort in descending order for exams.at (i).total.at(j) like this.. the output 1 34 2 56 3 21 and I want to cout the output 2 56 1 34 3 21 Is it must to use bubble sort or radix sort? [code=c++] #include <iostream> // std::cout #include …

Member Avatar for mitrmkar
0
610
Member Avatar for quecoder

Hi , I'm new to programming, I wanted to know if knowledge of C++ is enough to build a program that makes modifications in the system , like [URL="http://www.tune-up.com/"]Tuneup Utilites[/URL] program that repair registry errors, or check for hard disk failures , format it and check the mbr ...or it …

Member Avatar for quecoder
0
123
Member Avatar for h0neydip

[code] #include <iostream> using namespace std; const int queue_size = 1000; class queue { private: // array containing queue elements char data [queue_size]; char *front, // index of the front of the queue // indexes 1 before actual front element *rear; // index of the rear element in the queue …

Member Avatar for dougy83
0
118

The End.