1,288 Posted Topics

Member Avatar for Pervin_1
Member Avatar for mridul.ahuja
0
113
Member Avatar for al2714

This looks like some kind of Microsoft C++ variant. Managed C++, or some kind of C#, or some such. You might have more luck asking in that forum.

Member Avatar for Moschops
0
221
Member Avatar for tnd2491

Get log line. Check first two letter. If first two letters match the letters you're searching for, display the line. Using threads could make this slightly more complicated, depending on how you're providing the log lines.

Member Avatar for vijayan121
0
182
Member Avatar for manofprogram
Member Avatar for Alex_31

Don't use an array. Use a vector. Open text file. Fetch int from text file. push_back on the end of the vector. Repeat until done.

Member Avatar for Moschops
0
204
Member Avatar for tgreiner

> Now, the question is: When does it become necessary to allocate memory for an array? As programmer, you in effect have two kinds of memory available to you. The stack, and the heap. Anything you create without using *new* goes on the stack. All these go on the stack. …

Member Avatar for tgreiner
0
228
Member Avatar for Alyssa_2

`Checkout_Simulation.h:27: error: cannot convert 'const char*' to 'Passenger<int>*' in initialization` This is because you're trying to assign a char\* to an object of type Passenger<NODETYPE>\* in your initialisation list, here: `Checkout_Simulation() : super_express("Super Express Counter 01"),` See there? super_express is a Passenger<NODETYPE>\* object, and you're basically trying to do this: …

Member Avatar for Moschops
0
719
Member Avatar for markdean1989

I would expect that `TextBox1->Text` is a string object of some kind. You cannot assign a string object to a double. You will have to convert the string into a double first. If you have a compiler that support C++11, there is a function for doing this: http://en.cppreference.com/w/cpp/string/basic_string/stof

Member Avatar for ddanbe
0
824
Member Avatar for P

Also, line 23 is wrong. The remarkably similar (i.e. identical - better hope whoever is assessing this doesn't know about the internet) code at the end of this Powerpoint gets it right. http://www.letu.edu/people/jaytevis/Operating-Systems/Robbins/robbins-ch3-processes-in-unix.ppt

Member Avatar for P
0
173
Member Avatar for Surabhi_1

> i just wanted the logic behind the question thank you very much. The input will be five numbers. For each number, calculate a new number according to these rules: If the entered number is less than two, the new number is SOMETHING. If the entered number is more than …

Member Avatar for Surabhi_1
0
378
Member Avatar for anumash

Any string you create like this: "some words" is a *string literal*. The memory that those letters occupy is read only. This is part of the C standard; the rules of C. String literals are read only and you cannot change them. So when you do this: `char *str = …

Member Avatar for rubberman
0
283
Member Avatar for shifiya

You need to start by thinking. How would you solve this *without* a computer. How would you solve it by just drawing on a piece of paper? You can't code the solution until you know how to solve it.

Member Avatar for iamthwee
-1
150
Member Avatar for Dondrell
Member Avatar for Jazmine_1

What I see here is three classes defined. One class named invalidMin, one named invalidHr and one named invalidSec. I don't see any program to actually run, though. Where is your main function?

Member Avatar for Jazmine_1
0
310
Member Avatar for ms95

Your function `search_for_free` sets `head` to NULL. So on the line in question, you call `allocate`, which then calls `search_for_free`, which sets `head` to NULL, and then you try to access `head->next`, and insta-segFault.

Member Avatar for ms95
0
346
Member Avatar for David_53

std::begin is simply templated to use the container's begin, so there should be no difference. On line 20 you're trying to use a const iterator to change a value.

Member Avatar for vijayan121
0
354
Member Avatar for NoobCoder85
Member Avatar for Omar El Hussein

Not an alternate system; a way to make it easier to use the system you have. Put simply, if you want your operating system to show graphics, you have to ask it nicely. Your operating system, or the chosen window manager of your operating system, will have provided a number …

Member Avatar for マーズ maazu
0
184
Member Avatar for Yara Emad

How do you know it's finding the text file to open it? The textfile has to be in the working directory of the program that is running. This may well not be the same directroy as the source code, and it may well not be the same directroy as the …

Member Avatar for David W
0
489
Member Avatar for Christina_3

Helpful standard functions might be: http://www.cplusplus.com/reference/cctype/isupper/ http://www.cplusplus.com/reference/cctype/isdigit/ http://www.cplusplus.com/reference/cctype/islower/

Member Avatar for Moschops
0
235
Member Avatar for bidisha_1
Member Avatar for surya777
Member Avatar for NathanOliver
0
144
Member Avatar for nacedo

> sometimes 1 million letters Are you using windows? As I recall, the windows stack size default is 1MB, so a million letters will be too much to store on the stack and you'll have no choice but to use the heap (and I see you're using `int` values in …

Member Avatar for TalhaMoazSarwar
0
205
Member Avatar for Ctwo

`str` is an array of `int pointers`, but you treat it as if it were an array of `int`. Is it meant to be an array of `int`? What are you using to compile this? Your compiler really should have noticed that and warned you.

Member Avatar for TalhaMoazSarwar
0
200
Member Avatar for ryan.legow

You're allowed one main function per program. Just one. You seem to be trying to put one in each file. This is very bad.

Member Avatar for ryan.legow
0
2K
Member Avatar for fnk88
Member Avatar for DavidB
0
236
Member Avatar for markdean1989

It could be almost anything. This isn't a C++ question. Give up trying to install Visual Studio and use something else. There are many, many free options; as an added bonus, many of them are much easier to use and understand and learn from than Visual Studio.

Member Avatar for markdean1989
0
247
Member Avatar for tom.lynd.39

Get a long list of letters in the input buffer. Let's say the input is "abcde" and then "/r" because you press enter. First function gets the first letter, "a", then calls the function again. Second function gets "b", calls function again. Third function gets "c", calls function again. Fourth …

Member Avatar for mike_2000_17
0
168
Member Avatar for Hafiz_2

Here is how to create an array: `datatype array_name[size_of_array];`

Member Avatar for Moschops
0
47
Member Avatar for Jazmine_1

On line 8, what are you trying to create? This: ` int intList` suggests you're trying to create a single `int`, with the name `intList`. This: `new` suggests you're trying to create some kind of pointer. A pointer is not an int, so creating an int and then trying to …

Member Avatar for tinstaafl
0
201
Member Avatar for Mahbeezzy
Member Avatar for TObannion
0
192
Member Avatar for DS9596

The for loop inyour FindMaxMin function makes no sense at all, and you never call it, and it seems to be buried *inside* your main function, and you've go ta semi-colon at the end of line 34 so you don't actually even have a findMinMax function - you've just got …

Member Avatar for necrovore
0
1K
Member Avatar for DS9596

You're asking how to *tokenise* a string. Now that you know what it's called, you'll be able to find all the resources you need.

Member Avatar for Moschops
0
174
Member Avatar for RanyaAnwar

We won't simply do your homework for you. Show us how far you've got. Ask a question about something in your code you don't understand. You're going to have to do more than simply put the question up and hope we do it for you.

Member Avatar for RanyaAnwar
0
144
Member Avatar for Advaith_1

> Can you guys recommend what could be probably wrong with my computer There is nothing wrong with your computer. This is what is meant to happen. You ask it to run a program, it opens a window to run the program, when the program is finished the window closes. …

Member Avatar for svn74
0
271
Member Avatar for biabia1
Member Avatar for daylighti

I think one of your fellow students already asked this question somewhere else. http://www.cplusplus.com/forum/beginner/156797/

Member Avatar for Moschops
0
101
Member Avatar for prince.qureshi.94

http://www.cplusplus.com/reference/list/list/insert/ The program you're looking for is at the bottom. It inserts new entries into various places in the list.

Member Avatar for Moschops
-2
93
Member Avatar for tnd2491

A vector of what? A vector of strings? If each string contains the server name in it, you can just remove every string that doesn't contain that name.

Member Avatar for L7Sqr
0
196
Member Avatar for Builder_1

You can make it easier to think about by pretending the number is between one and ten. The algorithm is identical.

Member Avatar for SalmiSoft
0
133
Member Avatar for johans22
Member Avatar for johans22
0
209
Member Avatar for Sarkurd

If you don't write a copy constructor, you get one for free anyway. A very basic and simple one. In this case, all it will do is copy the pointer, `Buffer`. Let's think about what happens when you don't provide the copy constructor. First, a MyString object is created. This …

Member Avatar for Sarkurd
0
294
Member Avatar for phexee

I can't see your code from here, and neither can I see the compile errors you're getting. Maybe you should tell us the compile errors and show the code.

Member Avatar for Moschops
0
132
Member Avatar for TObannion

Let's imagine that you entered 0 for hour, and 5 for minutes. Which of your if statements is going to be true? The first one. This one: `if(hour<12 && minute<10)` So we'll enter that block. Let's imagine that you entered 0 for hour, and 15 for minutes. Which of your …

Member Avatar for TObannion
0
236
Member Avatar for LATCH808
Member Avatar for LATCH808
0
167
Member Avatar for latrodectuss.imvu
Member Avatar for latrodectuss.imvu

Read every word from the file, and write it out to a new file. When the word you read in is the one you want to replace, don't write the original word; write your replacement word. When done, delete the original file and rename the the new file to match …

Member Avatar for Moschops
0
11K
Member Avatar for SurabhiMeeooww

You need to work out how you would explain doing it to someone who had no idea what you were talking about. For example: You're going to output lines of numbers The first line will be just the number 1. The second line will have two numbers in it. The …

Member Avatar for iamthwee
0
190
Member Avatar for tewodros addis

I would not call this C++. If I had to describe it, I might use the phrase "C++" but I would explain it's some kind of primitive, old dialect. Use proper C++ strings. Don't use char arrays. Don't use `conio.h`, unless the year is 1993 and you're coding for MS …

Member Avatar for JamesCherrill
0
214
Member Avatar for lewashby

> why not just compile the header files along with the rest of the library files? When you compile your code, the compiler has to know about library functions you are using. It has to know what they're called, and what parameters they accept, and what kind of parameter they …

Member Avatar for gusano79
0
183

The End.