49,757 Topics

Member Avatar for
Member Avatar for usustarr

I am fairly new to C++. I work as an intern and I need to pass a pointer to a function. Can someone please help. [CODE]U8 System::check() { Array drives = Array::update(system); ...... ...... check2(drives); ........ } U8 System::check2(Array drives) { Array bad_drives = Array::drives.filter(&new_drives); }[/CODE] If I were to …

Member Avatar for arkoenig
0
122
Member Avatar for austiine04

Hi guys i want create a program that can write to a pdf file and here is the code i used. when i run the program, it compiles well, and runs but the pdf file that is created is not readable/corrupt. i am just wondering whether there is some library …

Member Avatar for jackmaverick1
0
155
Member Avatar for king.chang
Member Avatar for CSWalls

[B]Hi guys!!... I am just looking for some startup guidance with a program I am supposed to write.. it goes like this ->[/B] A program which compares these three hashing methods: 1) open addressing with linear probing, 2) open addressing with quadratic probing, and 3) separate chaining. Input will come …

Member Avatar for CSWalls
0
210
Member Avatar for John Linux

I am using a) Linux b) Pthreads I want to write a program, with two pthreads, to cater for two queues of people. People arrive at each queue at a random interval of 1 - 10 seconds. Each time a person arrives, print out the number of people in each …

Member Avatar for John Linux
0
180
Member Avatar for Sc@recrow

Overview: I am trying to write a program that generates an array of randomly generated integers, and sorts them as the array is being generated. I've just used 7 elements in the following example, as it's easier to check for errors that way. Code: [CODE]#include <iostream> #include <ctime> #include <cstdlib> …

Member Avatar for Sc@recrow
0
660
Member Avatar for geekme

Hey, I know the algorithm for a network router but do not know how to implement in coding.Kindly help me with the coding part. Regards.

Member Avatar for L7Sqr
0
103
Member Avatar for harinath_2007

hi.. i am using windows 7 (32 bit) ultimate. where can i get turbo c++ for windows 7?? what should i use for compiling and running c/c++ programming in windows 7

Member Avatar for Ancient Dragon
0
237
Member Avatar for penguino138

Ok, so im trying to make my sister a flashcards program with dev c++. What you do is put in the deck name and how many cards you want. Then you go through for each card and put in what's on the front and back. I also want it so …

Member Avatar for Stefano Mtangoo
0
1K
Member Avatar for jowana

Hello, I have got an square image with a point specified by the user(not neccessary to be in the centre). I want my program to draw a line or vector from that point to the boundary of the image. Then, I want to draw the same vector again and again …

Member Avatar for Stefano Mtangoo
0
192
Member Avatar for virtue

Hi, I can not create executable code by using a makefile.How can I generate the executable code.I wrote this lines into my makefile and in the terminal I wrote make but I can not do it.Please help me. myprog : myprog.o mylibrary.o gcc myprog.o mylibrary.o -o myprog myprog.o : myprog.c …

Member Avatar for thekashyap
0
167
Member Avatar for kimmyfufu

I am taking this class through devry and that is my assignment for week four and this is my second attempt at the class..but this is what i got for this assignment..program compiles properly and runs...with no errors..got it from code snippet stealing from other classmates lol [code]# include <iostream> …

Member Avatar for donkeylopulus
-3
506
Member Avatar for winecoding

In the main function, I have one two-dimensional array, A. I need to pass A into a function f, which takes A, may change A. f will also generate another two-dimensional array B based on some operations on A and return A. I know it is about passing pointer passing …

Member Avatar for Arbus
0
677
Member Avatar for sethwb

Hello, I am a student and I'm having trouble figuring out why my if statement won't evaluate. I'm not getting any error in my compiler - I'm using Dev-C++ 4.9.9.2 The if statement in question is on line #160 in the code below (full code). You will need the students.txt …

Member Avatar for PathikRaval
0
287
Member Avatar for XodoX

Hello, I would like to have a program that solves Gaussian elimination. I need it for reference, I think it would be nice to have a tool like this. Now, I know there are many codes I could use online, but I need a code that formats my equation. Like, …

Member Avatar for mike_2000_17
0
152
Member Avatar for salty11

In this program i am trying to find numbers that are multiples of 7,11, or 13, also if the total of the numbers is even or odd also the square root value of each number also if there are any prime numbers in the list [CODE]#include<iostream> #include<iomanip> #include<fstream> #include<cmath> #include<conio.h> …

Member Avatar for frogboy77
0
304
Member Avatar for lima01

Hi, I am starting to make programs with GUI, so with buttons, frames etc, and some of them will work via internet, like multyplayer card game or something like that. So during my search, I ran onto few choices, Qt, Win32 api, wxWidget and by most forums the Qt is …

Member Avatar for gerard4143
0
188
Member Avatar for PlyrJames791

Hi I'm new to C++ and I'd like to make a program that responds to MIDI input from an external device (e.g. MIDI keyboard). I've found a library that should do what I want here: [URL="http://www.music.mcgill.ca/~gary/rtmidi/index.html"]http://www.music.mcgill.ca/~gary/rtmidi/index.htm[/URL]. I'm using VC++ 2010 Express, and I can't figure out how to actually use …

Member Avatar for kiran_ur_frnd4u
0
1K
Member Avatar for salty11

For this code i am inputing one number and trying to see if it is a perfect number [CODE]#include<iostream> #include<cmath> #include<iomanip> #include<conio.h> using namespace std; void perfect(int); int isfactor(int, int); int N, i; int main() { perfect(N); isfactor(N, i); } int isfactor(int number, int divisor) { if(number%divisor==0) return 1; else …

Member Avatar for PathikRaval
0
335
Member Avatar for Tamlyn

Hey everyone :) I'm new to c++ and have just joined this site. Looks great. Hope you guys can help. I'm having trouble with the function calcAllowedPerChild() What I want the function to do: subtract the gifts TOOTHBRUSH, HIGHLIGHTERS, CRAYONS, NOTEBOOK , AND PEN, from the amount left(leftToSpend) while the …

Member Avatar for Tamlyn
0
377
Member Avatar for destroyer89100

Hello If we want to do a program for this restaurant but we dont know how many menu items and we know that is it less than 50 also we want to count every single item seperately when the user choose that item, and then compute the price of the …

Member Avatar for Ezzaral
-1
73
Member Avatar for giggity

Write a program that allows the user to enter a series of positive integers one at a time and in increasing order (using -1 as a sentinel value), and then computes and displays the median value of the data entered, as well as the number of data values entered. You’ll …

Member Avatar for giggity
0
133
Member Avatar for super-duper

Hi, I'm working on my time complexity understanding in C++. Right now, I'm trying to figure it out, and kinda got some of them, such as: constant O(1): [CODE] int first(int N){ int i = N; int x = 0; x++; return x; } [/CODE] O(n) [CODE]int second(int N){ int …

Member Avatar for Narue
0
144
Member Avatar for super-duper

Hey guys, I'm reading this thing about "Time Complexities". But I'm having a hard time wrapping my mind around it. I know that it's all about the different algorithms that take different amounts of time for different amounts of instructions and stuff. What I don's understand is that how to …

Member Avatar for super-duper
0
112
Member Avatar for subith86

Here the value of int x is always zero. I don't know if there is any case where it is non-zero. If so pls reply. [CODE]int OperOverld::operator--(int x) { cout<<x<<endl; //always zero //some code goes here //... //... //... //atlast return some int }[/CODE]

Member Avatar for Narue
0
174
Member Avatar for kirenemook12

hello everyone. i am making a program which has multiple windows. how do I program that when one window pops-up, the other closes? i am using Microsoft visual studio 2010, in a Win32 application. i am not using a windows form.

Member Avatar for kirenemook12
0
157
Member Avatar for comwizz

I cannot figure out how to open the results/output window in Dev c++. Also how to effectively use step over / step into . I kept breakpoints at certain points in my program but step over from then onwards does not happen by pressing ctrl+f7 and I dont know how …

Member Avatar for deepshikha more
0
440
Member Avatar for jackmaverick1

Hi, I've been looking for a while for things that would give me random numbers under a value that I can specify (for me it's 5). I've seen [ICODE]rand();[/ICODE] and [ICODE]srand();[/ICODE]. I also know that[ICODE]srand()[/ICODE] is the seed and [ICODE]rand()[/ICODE] is the random number itself. Even the example programs don't …

Member Avatar for pseudorandom21
0
338
Member Avatar for margeaux54

hello. I am struggling until 4 weeks. you know ancientDragon. whatever . ı do no go forward anymore. I need names of books that can help me. I have a information but it is not enough. ı want to understand questions on these websites. I have only little array, pointer, …

Member Avatar for jackmaverick1
0
94
Member Avatar for kirenemook12

hello every one i am making a program what requires that the user types in some text in a textbox. the problem is, how do i get that text from the textbox into the std::string (or a other kind of string)? i don't know how to do that in Win32, …

Member Avatar for kirenemook12
0
777

The End.