1,288 Posted Topics

Member Avatar for cobaltfive

> pass this string to my boolcheckpassc(char *) You don't have a function named boolcheckpassc that accepts a char-pointer.

Member Avatar for cobaltfive
0
205
Member Avatar for sainisunil05

`int& num;` This mean "num is another name for something - it's some other object completely, and this is just another name for that other object". So what object is it another name for? `myclass(int number) : num(number){}` It's another name for this variable `number`, which exists for a very …

Member Avatar for Moschops
0
95
Member Avatar for davidfunmi
Member Avatar for sanyam.mishra

Your old programs are written in C++ from before 1998. Fifteen years. To fix them, I expect you need to learn how C++ standard library headers are named now (they do not have the `.h` on the end) and you need to learn about `namespace`.

Member Avatar for mike_2000_17
0
132
Member Avatar for mozammel

`delete` means "see this memory that I got using `new`? I don't need it anymore. Please run the appropriate destructor function and I don't care what you do with it after that." You can only `delete` memory that you got using `new`. You didn't get any memory using `new`, so …

Member Avatar for rubberman
0
212
Member Avatar for arham.malik.900
Member Avatar for RJ Adeel

Welcome to the board. The common language used here is English; you are speaking some kind of shorthand that is not very clear. It will help people to answer your questions if you use proper English, if you are able to. I think you're asking "How can I write a …

Member Avatar for Moschops
0
116
Member Avatar for 9tontruck

You're not looking for the area centre of a rectangle, because only one of your examples is actually a rectangle. I think you're asking how to identify the point in a given four-sided shape that, when a line is drawn from that point to all corners, each of the four …

Member Avatar for Moschops
0
399
Member Avatar for nathan.pavlovsky

It doesn't freeze. It just never makes a move. Add code to output lines telling you when it enters and leaves functions, and the values returned, and you'll see where the logic problem is. Welcome to debugging.

Member Avatar for nathan.pavlovsky
0
174
Member Avatar for arslan.maqsood1
Re: c++

This appears to be a question from "A First Book of C++", either written for the Indian market (or simply with whoever is setting the quesations swapping out a USD amoung for an INR value). Many people have asked these questions many times. If you just want answers, you can …

Member Avatar for rubberman
0
145
Member Avatar for MasterHacker110

It's a trade-off. DirectX is harder to use and does a lot less for you, requiring you to have more knowledge, time, etc. What you get is more control, which you can translate into more closely making it do what you want, with higher performance. > Isn't there an easier …

Member Avatar for MasterHacker110
0
146
Member Avatar for nitin1

You say "a linked list is given", and a "pointer to a node which is to be deleted". Do you actually mean this; that you get the list in some way, AND the node to be deleted? If you have nothing but the node to be deleted, and it's the …

Member Avatar for deceptikon
-1
139
Member Avatar for nitin1

You need to think of a way that you only look at each entry in the list once, and at the end of it know the answer, or at least can find it very quickly. How would you do this on paper? If I read out a list of words …

Member Avatar for deceptikon
0
127
Member Avatar for geethik

What's your C experience? The way you ask the question suggests that this might be awfully difficult for you as a first project.

Member Avatar for geethik
0
330
Member Avatar for MasterHacker110

` unresolved external` means the linker can't find the function. Usually, this means that you're not linking to the right libraries. It's not enough to tell the linker which directories to look in. You also have to tell it which actual library files to use.

Member Avatar for MasterHacker110
0
413
Member Avatar for kamalashraf
Member Avatar for triumphost
0
606
Member Avatar for isha.dakhara
Member Avatar for taogomano.wau
Member Avatar for iraklakis

So let's have a look here... `int T,i,j,t,c,r[T],Jmax,Z,k; ` So j is an int, size undefined here (so it could be any value at all) at this point. I see you also make an array, `r`, which could be any size at all and there's no way to know. ` …

Member Avatar for iraklakis
0
235
Member Avatar for erogol

Something like this might do it. collapsed theCollapsedobject; // Create the one to copy across data theOneYouWantToCopy; // Create the one to copy across theOneYouWantToCopy.collapsed = &theCollapsedobject; data* d_pointer_to_struct_on_device; // make a pointer that will point to the device memory cudaMalloc(&d_pointer_to_struct_on_device, sizeof(data); // allocate memory on device collapsed* d_pointer_to_collapsed_on_device; // …

Member Avatar for Moschops
0
3K
Member Avatar for daino

Read the error message. They usually give you really good clues as to what the problem is. If you're new to them, they can be a bit tricky to understand, so if you post it, we can walk you through it. Also, it's helpful to us if you make it …

Member Avatar for Moschops
0
491
Member Avatar for sanyam.mishra

In turbo C++ 3.0, I've no idea. Could be anything. If you were using something a bit mroe modern, I'd point you at the C++ 11 threading library, or a standard third-party threading library like pthreads or the Win32 threading libraries.

Member Avatar for mike_2000_17
0
576
Member Avatar for GregXaiver

> When you compare a range such do you use && or do you use the or statement to compare them? You cannot compare ranges. You can only compare two objects at a time. You could write code yourself to compare, for example, two lowest nubmers and then two highest …

Member Avatar for GregXaiver
0
169
Member Avatar for daino

An html file is plain text. std::ofstream FileOne("c:\\testfile.html"); This creates an empty html file.

Member Avatar for daino
0
1K
Member Avatar for wauspe
Member Avatar for new_developer

Long story short, no. If you created your own class you could add an internal value to do it for you, but not with a plain primitive type like an int or a char.

Member Avatar for mike_2000_17
0
352
Member Avatar for MasterHacker110
Member Avatar for nitin1

There is no way to know the size of an array that has been passed to a function without also passing the size of the array. The best you can do is to know something special about the array; for example, maybe you make the first element the size of …

Member Avatar for Banfa
0
120
Member Avatar for oosinoots

Drawing on the screen is complicated. Let's go back a step. C++ doesn't know what a monitor is. It doesn't know about colours, or lines, or the keyboard, or what a mouse is, or anything like that. All that is handled by your operating system. If you want to draw …

Member Avatar for adam tolstoy
0
157
Member Avatar for Himanshu Chawla

`for(j=65;j<=i;j++;count++)` Too much. Should have only three statements.

Member Avatar for Schol-R-LEA
-1
198
Member Avatar for dendenny01
Member Avatar for Schol-R-LEA
0
221
Member Avatar for okundi
Member Avatar for Mr.UNOwen
Member Avatar for sirlink99

As an aside, this will fail if the file does not exist when an attempt is made to open it. Try specifying the open mode when you open it: ` fstream myFile ("C:/Test/C++FileRW/test.txt", std::ios::in | std::ios::out);`

Member Avatar for sirlink99
0
392
Member Avatar for soche123
Member Avatar for new_developer
0
235
Member Avatar for Lee Stone

This being C++, there are ways of doing whatever you're doing that are much easier for you to keep track of and think about. Does it have to be a 3D naked-array of 3D naked-arrays of 3D naked-arrays? If you're actually modellings a groups of *somethings*, each of which contains …

Member Avatar for Lee Stone
0
342
Member Avatar for dreamcode2412

Represent the image as a 2D array of pixels. Make a new blank 2D array of the same size. Flipping: For all width and all height, copy pixel[i, j] to newpixel[height-i, j] (remember to start counting at zero). Rotation is a similar simple transformation. This is programming. The art, craft …

Member Avatar for DeanMSands3
0
443
Member Avatar for Suzie999

I struggle to think what you have done with your code if you are unable to use a function that has been written in a different cpp file. So long as the cpp file you want to use it in has seen the prototype of that function (which is usually …

Member Avatar for Suzie999
0
203
Member Avatar for shubam
Member Avatar for RonalBertogi
-2
147
Member Avatar for nitish.mohiputlall

> that allows the user to enter integer numbers. Can you do that bit?

Member Avatar for Ancient Dragon
-1
195
Member Avatar for Iamateur
Member Avatar for yassink

` while ( (z != "F") || (z != "C") || (z != "Y") )` Can you give me a value of z for which this will not be true? Any value at all - give me one letter that will make the while loop stop.

Member Avatar for RonalBertogi
0
321
Member Avatar for sasukecold

`void main(){` has never ever ever been correct. `int main(){` is. For your code to work, the executable needs to be in the same directory as the text file you're trying to open. Is it? How do you know?

Member Avatar for Ancient Dragon
0
202
Member Avatar for saad.taj1

We don't do homework. Show us your code and ask us to help you with something you don't understand.

Member Avatar for Moschops
0
88
Member Avatar for TuteePink

`int *ptr;` means "create an int-pointer named ptr", `double *ptr; `means ""create a double-pointer named ptr", so `T *ptr;` means "create a T-pointer named ptr." The type `T` will be whatever type you actually use when you use this template.

Member Avatar for mrnutty
0
150
Member Avatar for nomorelogic

Storing them in a text file seems a bit of a pain. Why not create an `objects` class, and store them in , for example, a `vector<objects>`?

Member Avatar for Moschops
0
2K
Member Avatar for aroojasif22

We won't do your homework for you. How far have you got? Have you got this far yet? int main() { } What are you stuck on, or what do you not understand?

Member Avatar for aroojasif22
0
161
Member Avatar for irtza
Member Avatar for jt1250champ

`int primes[(limit/2)+1];` This is an array of 150 000 000 001 `int` values. If each int is four bytes, that's 600 000 000 004 bytes. That's a bit over 500 GB. I'm guessing you don't have 500 GB of memory. Similar issue with that array of `bool` you have. You …

Member Avatar for rubberman
0
184
Member Avatar for noor_iz9

The End.