49,757 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 << … | |
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 … | |
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 … | |
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 | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
What do the numbers tell me, in terms of frequency, amplitude and maybe time? Thank you muchly! drue | |
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 … | |
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, … | |
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 : … | |
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 … | |
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 … | |
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 ========== | |
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 … | |
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 … | |
How can I make a student data base using linked list in c++. | |
[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] | |
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 … | |
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. … | |
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 = ""; … | |
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 … |
The End.