49,757 Topics

Member Avatar for
Member Avatar for aaronmk2

I am pretty sure that the answer for this is n^3, because the 3rd for loop is executed n times and the middle is executed n+4 times and the top one is executed n times. I understand how to use sigma notation for the bottom and top for loop because …

Member Avatar for mrnutty
0
142
Member Avatar for Nathaniel10

An exercise in Stroupstrup's book is to write a program involving memory allocation with an infinite loop and let it run until it crashes. He says the crash will be due to [i]memory exhaustion[/i]. He also suggests researching the topic. I did and am frightened by what I found. The …

Member Avatar for Nathaniel10
0
1K
Member Avatar for Beancounter5

Hello , sometime ago I started a small project centred around some crazy mutating breeding rabbits( sounds silly but I have learned an awful lot ,especially about lists). Anyway , as each year passes the number of rabbits grow - not exponentially but very quickly all the same. The next …

Member Avatar for mike_2000_17
0
100
Member Avatar for L.sha

The question is to - Suppose you have a main() with three local arrays, all the same size but type (say float). The first two are already initialized to values. Write a function called addarrays() that accepts the address of three arrays as arguments add them and put their sum …

Member Avatar for Intrade
0
2K
Member Avatar for Vllinator

I need to return the numbers of the lotto ticket to main, then call a print() to print the numbers. But the ticketGenerator only returns 1 number. Please help [code] #include <iostream> #include <ctime> using namespace std; int ticketGenerator(int); void printTicket(int,int); int main() { int size; int numbers; cout << …

Member Avatar for sid78669
0
110
Member Avatar for jae5086

Ok, I am having two issues with this program, and since I am new to the forum, yes, I am a beginner so I am sure the error is so common it makes you want to cry seeing it again, haha. Anyway, the program is supposed to keep working with …

Member Avatar for jae5086
0
105
Member Avatar for Software guy

Hi, I have been working on this small console applications for 2-3 days now but I cannot find the problem. The Task is that I have to read a file which has sentences in english and I just have to get the frequency for each character and print it out …

Member Avatar for Software guy
0
124
Member Avatar for sahil1991

hi friends, i was doing functions and i encountered this thing that automatic variables are stored as stacks and static,global as heaps.I am in a bit confusion about these terms......can someone help me out...plz

Member Avatar for mike_2000_17
0
137
Member Avatar for ekailan

I have this tow errors ,how I can solve it.any ideas? error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRTD.lib AC fatal error LNK1120: 1 unresolved externals Debug\AC.exe AC

Member Avatar for ekailan
0
128
Member Avatar for hveed

hi, I am new to programming and looking for some help, here is the portion of the assignment that is giving me headaches: using one function, upload (i.e., input) the integer value and the color text, ignoring the word "Color:"; the function must only upload one data pair (i.e., the …

Member Avatar for Ancient Dragon
0
136
Member Avatar for DarkSatan

I just found this tough question in the last year Q Paper of this competition...1st how can I take inputs in a single line??(noob question) 2nd Can any1 help me with the logic to use...If u cud write a small eg. prog I would be greatly thankful NOTE:I had also …

Member Avatar for DarkSatan
0
125
Member Avatar for Morbane

Hi, I have been trying to use a struct to hold some const chars that represent a fixed date The idea is to select a date on a Month Calendar and compare it to the fixed date in the struct so that a MessageBox can show [code] typedef struct BASEFULL …

Member Avatar for comeugive
0
232
Member Avatar for Spinz

Hi! I am a beginner in C++, I hope that anyone can advice me on approaching this problem. I would like to implement a class graph that uses breath-first search in order to remove a chosen vertice as well as its corresponding edges. I want to: *add or remove edges …

Member Avatar for alwaysLearning0
0
72
Member Avatar for DarkSatan

I just found this tough question in the last year Q Paper of this exam...I dont know how to take that type of input,leave alone the logic...Can any1 help me with this program, plz... : [B] Question 1 Vogon zoo On the icy planet Zorg, the Vogons are putting together …

Member Avatar for csurfer
0
320
Member Avatar for aladar04

Hi! I am having trouble with this program. I'm done with the creation of records. My problem is, I cant make it print a record using the Record Number inputted by the user. I used seekg() but it doesn't work. I have attached the files for reference. try.cpp and accounts.txt …

Member Avatar for alwaysLearning0
0
107
Member Avatar for DrueY

What do the numbers tell me, in terms of frequency, amplitude and maybe time? Thank you muchly! drue

Member Avatar for DrueY
0
477
Member Avatar for Alexkid

Hi there, Can anyone tell me how to change my win32 programs icon (top left). I'm running MSV C++ Express 2010, so i don't have MFC. Theres a few tutorials on how to do this but using resource files? Which apparently MSV doesn't support. I want to be able to …

Member Avatar for Alexkid
0
315
Member Avatar for cortez716

Okay here's what I'm trying to do use a for loop get 5 numbers from input ONE number at a time. Output the sum and average of the 5 numbers. I am only allowed to use a maximum of 2 variables to solve this problem. Heres my code so far, …

Member Avatar for WaltP
0
152
Member Avatar for ysmelik

I Try to make program Audio Recorder from LIne In / Microphone using C++ Builder. I get 2 Error message : 1. E2171 Body has already been defined for function '_fastcall TForm1::~TForm1()' 2. E2188 Expression Syntax Can somebody help me to finishing this problem ? Here my Simple program : …

0
73
Member Avatar for crazylunatic

I have a VS project which is compiled using the unicode character set. I load a dll using LoadLibrary and that dll is also built using the unicode character set. I use a method exposed by the dll which returns me a std::string. I am having some trouble with converting …

Member Avatar for crazylunatic
0
707
Member Avatar for kirennian

I'm currently having an issue with moving the camera around the z-axis (roll). For debugging purposes, I have an object with which I've tested with all 3-axis rotation and movement and it's working as expected; the object in question as well as the camera class superseed a positions class for …

Member Avatar for dineshguru
0
999
Member Avatar for burcin erek

1>------ Build started: Project: allegro, Configuration: Release Win32 ------ 1> allegro.cpp 1>MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main 1>c:\users\lenovo\documents\visual studio 2010\Projects\allegro\Release\allegro.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Member Avatar for burcin erek
0
109
Member Avatar for aviavyne

Hello, I started C++ and I have a trouble with this thing. I can't make it work. What I am trying to do is to get the value and calculate the area of a circle using a class type of coding style. Note that this does not even compile. "Where …

Member Avatar for Unimportant
0
108
Member Avatar for waynew

I readily admit that I am not a heavy developer, otw I probably wouldn't have this problem, but here it is. I cannot get openssl to compile under Windows. Mingw/msys is installed ok. Downloaded then unpacked openssl under my mingw home dir. So far ok. cd to openssl-1.0.0a Executed ./config …

Member Avatar for Ancient Dragon
0
117
Member Avatar for Anuradha Mandal
Member Avatar for Ancient Dragon
0
68
Member Avatar for yesamin

[ICODE]void doublyLL::addFront(int x) { node * somenode = new node(x); if( head != NULL) head->prev = somenode; somenode->next = head; head = somenode; } void doublyLL::addBack(int x) { } [/ICODE]

Member Avatar for Ancient Dragon
0
61
Member Avatar for dmm1983

The practical exercise for this session will be to create a cash register program that you input the cost of an item, the number purchased and if a sales tax applies to the item. If a tax does apply to the item, the tax value will be ten percent of …

Member Avatar for Unimportant
0
176
Member Avatar for Rickay

I am trying to make a reference program that you can use to access any element of the periodic table based on its name, symbol, atomic number, or atomic mass. It is more than one file, and I need a way to return to main if the user wants to. …

Member Avatar for dylank
0
239
Member Avatar for cosnersx

Okay, I've just started learning C++ and I'm on the third chapter of my book which deals with control statements. Basically, I've learned how to create very basic text based games. [CODE] #include <iostream> #include <string> int main (void) { using std::cout; using std::cin; using std::string; string options = ""; …

Member Avatar for cosnersx
0
95
Member Avatar for mandm911

I need to write a program that tells the user to input one fraction(numerator and denominator), along with two other fractions that are given. The program must +,-,/,*,reduce,reciprocate, and find if the given fractions are greater less than or equal to one another. I have no clue of even where …

Member Avatar for daviddoria
0
1K

The End.