6,741 Posted Topics

Member Avatar for jeanatkin

>I'm here to query you on a doubt I have in dynamic initialization. You sound like less of an idiot when you speak clearly. "I'm here to ask you a question I have about dynamic memory" is much better than trying to sound smart by using uncommon and inappropriate words. …

Member Avatar for Narue
0
112
Member Avatar for barb213ks
Member Avatar for jwenting
0
795
Member Avatar for kosham

>i dont know how to implement accessor and mutator functions. Accessor and mutator are just fancy terms for a function that gives you the value of a member and a function that sets the value of a member: [code] class test { int member; public: int accessor() { return member; …

Member Avatar for Narue
0
168
Member Avatar for xxraveteddyxx

><iostream.h> is deprecated No, it isn't. A deprecated feature has to have been a part of the standard in the first place. <iostream.h> was never a standard header. >With iostream you need to put std:: before cin and cout. There are three options for qualifying a namespace. First, you can …

Member Avatar for alc6379
0
214
Member Avatar for 3246251196

>cannt you pass the CONSOLE_INPUT straight into the function? Not the way you want to do it, no.

Member Avatar for 3246251196
0
347
Member Avatar for jingchak

>gimme I hate this word. >C/C++ What is this C/C++ language you speak of? There's no such thing as C/C++. There's C and there's C++, but no C/C++, as any knowledgeable user of both will gladly tell you. Anyway, to answer your pseudo-question/demand, go here: [url=http://mindview.net/Books/TICPP/ThinkingInCPP2e.html]Thinking in C++[/url]

Member Avatar for jingchak
0
163
Member Avatar for Nauro

I'm curious why you want to go to all of this extra effort when functions would do. But what the hell, look into pipes. Create a pipe for each program and read/write to it accordingly during run-time.

Member Avatar for Narue
0
84
Member Avatar for crq

>I hate it when people place the brace { on the same line as the expression Get over it. Style issues are a matter of opinion, and you shouldn't push your opinions on other people. >I wonder if that is hanging you up. That's legal C++. 0 will be returned …

Member Avatar for 1o0oBhP
0
547
Member Avatar for babablacksheep

Remove the int from in front of rtotal. Type names are (for the most part) only used in declarations and type casts. Because your use is neither of those, it's a syntax error. Of course, the code you've posted has other syntax errors as well.

Member Avatar for Narue
0
142
Member Avatar for vamp

The API function is called [url=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/keybd_event.asp]keybd_event[/url]. It's not terribly difficult to learn how to use it with the reference available. So why not give it a shot and you'll learn something about computers and programming. There's nothing wrong with that. If you want someone to write a program for you …

Member Avatar for Narue
0
119
Member Avatar for giedz86

The dynamic declination flag was accidentally switched to EIEIO. Check your atomic memory pool for floaters because they're probably causing the kernel to pop. But be careful because the memory manager is volatile and could cause the entire pipeline to dump core.

Member Avatar for Narue
0
117
Member Avatar for xxraveteddyxx

>to demonstrate a char array overflow. Array overflow is undefined. Your demonstration is non-sensical because the result could be anything.

Member Avatar for Narue
0
108
Member Avatar for broken_recode

It sounds suspiciously like a memory problem such as a dangling pointer. They can be incredibly difficult to debug because sometimes everything works fine and sometimes it crashes miserably. Before you blame your system or the compiler, make sure your code is perfect. Otherwise you're showing nothing but arrogance in …

Member Avatar for Narue
0
279
Member Avatar for sugpo

Okay, and what have you tried? We don't do homework for you, we help you with specific problems (when the specific problem isn't "I need you to do my homework").

Member Avatar for Real-tiner
0
172
Member Avatar for moomoouk

>1. design support for 'programming in the large' We let you write big programs. >2. a modern object model that supports concurrency: activities in objects replacing passive method calls We let you do more than one thing at a time. >3. formalised interaction between activities (dialogs) We force you to …

Member Avatar for Real-tiner
0
115
Member Avatar for harshchandra

>I guess I just did your homework for you. That's bad. That's not an edit, so you knew that you did his homework and you knew that it was bad [b]before[/b] you clicked submit. So were you trying to show off? If so, you failed miserably.

Member Avatar for murschech
0
135
Member Avatar for Dani
Member Avatar for Catweazle
0
395
Member Avatar for AQWst

>I am just getting started and can not find a Java equivalent to C++'s scanf command. You shouldn't be using scanf in C++. The best way to parse input remains the same for C++ and Java: read a line and then tokenize it.

Member Avatar for server_crash
0
506
Member Avatar for usha
Member Avatar for burumun

Does the error repeat every time you try to build? If so, it's your code. If not, it's a fluke that happens occasionally.

Member Avatar for Narue
0
90
Member Avatar for Tester2

[quote]I would like to know how to send an AnsiString variable called "Data" to a template class function so that the calling block can immediately access the value associated with the AnsiString variable "Data" that is assigned to it in the template function after control is returned to the line …

Member Avatar for Narue
0
169
Member Avatar for blackhawk
Member Avatar for dj_saxy

>Yes i'm compiling it as an .exe and it it runs fine. That doesn't answer the question. When you create a project in Dev-C++ you can choose a Win32 application or a Console application. You chose a console application, which automatically spawns a command prompt window for running the program. …

Member Avatar for dj_saxy
0
105
Member Avatar for Guppy25

>compiler says "main must return int" >teacher says it's fine Your compiler is right and your teacher is wrong. main has never returned anything but int in C or C++. If a compiler allows it then it's a non-standard extension to the language and you can't expect your code to …

Member Avatar for murschech
0
124
Member Avatar for JimH

>I need to assign a value to a variable named in a sting variable. Why? Most of the time this problem can be solved differently by looking at it the right way. Since this appears to be C, it takes quite a bit of work to solve it properly, and …

Member Avatar for JimH
0
197
Member Avatar for akoloff

>there're gotta be a better way ... There isn't unless your system supports record-oriented files. Any solution will be a variation of what you were thinking of doing. Though naturally, any decent solution will take advantage of block reads and caching to avoid the performance hit of constantly reading and …

Member Avatar for Narue
0
78
Member Avatar for freesoft_2000

>Seriously C++ days are numbered. You're an idiot. There were people like you who ignorantly thought that COBOL's days were numbered in 1974. Lo and behold, COBOL is still used quite a bit 30 years later. So, you're an idiot, and I won't waste my time explaining why since you're …

Member Avatar for alc6379
2
2K
Member Avatar for compeat

>do you know ---> why this error happened?? Not with your incredibly sparse example. However, once I include <iosfwd> and do a using std::ostream, it compiles fine.

Member Avatar for Narue
0
130
Member Avatar for moderate_rock48

One of your programs that you're writing? Or one of your retail programs that happens to like the debugging software that you have installed and lists that as an option when it panics? If it's the former, go to the forum for the language you're working with. If it's the …

Member Avatar for Narue
0
75
Member Avatar for dalaharp

>it will take the ASCII value of a which is 97 We don't care whether you know what the integer values of the ASCII characters are. Stop assuming a specific character set. Geez, how many times do I have to repeat myself before you people get a clue?

Member Avatar for Narue
0
122
Member Avatar for lizp

>why won't this work? Because it's dreadfully broken. Format the code properly, then read the errors when you try to compile.

Member Avatar for Narue
0
131
Member Avatar for Programmer88
Re: Help

>Never use goto statements - it's very bad programming practice! Moo, tell me, how does it feel to be cattle? I mean, you have to be a part of the herd if you mindlessly believe what you just stated. *sigh* This argument is tiresome, so I'll leave you with this …

Member Avatar for Coconut Monkey
0
158
Member Avatar for galmca

I refuse to help you until you learn how to indent your code. You're using code tags, so the problem is on your end. I don't know if you're lazy, or just stupid, but either way it makes your code harder to read and I don't have time to reformat …

Member Avatar for Asif_NSU
0
1K
Member Avatar for wardduncan

Unless you want to do precise error handling and throw a message if the user enters something other than q or Q, you can simply place the entire processing code into an infinite loop and break if scanf fails: [code] #include <stdio.h> #include <stdlib.h> /* Main Program */ int main(void) …

Member Avatar for wardduncan
0
162
Member Avatar for galmca

Deja vu, deja vu, the OP has some learning to do! Why start two threads with the exact same question?

Member Avatar for Narue
0
120
Member Avatar for galmca

To insert a value into an array, you need to shift every value [b]after[/b] the location you want to insert. This way you make a hole for the new value. Of course, this can be a problem if the array is already full. You would most likely end up throwing …

Member Avatar for 1o0oBhP
0
450
Member Avatar for compeat

Well, since your code is so incomplete there's no telling what the error is. Are you including the proper headers? Are you accounting for the std namespace? Is everything declared before it's used?

Member Avatar for Narue
0
158
Member Avatar for helloworld

[quote] do you know anything about c++. or have you just created this site for fun. i though you people knew certain things, i guess i was wrong. how hard can it be for creating a my program [/quote] Bahahahahahahaha! That's a good one. "Here's my homework, do it for …

Member Avatar for Narue
0
126
Member Avatar for goforit

>gets(str); /* Getting a dtring from the user */ I [b]know[/b] you didn't just use gets. You couldn't have. Nobody could possibly be that stupid after nearly 30 years of everybody with a brain screaming the peril of gets at the top of their lungs. >then call a function and …

Member Avatar for Narue
0
182
Member Avatar for Kimmi
Member Avatar for diegomoreno

>just wanna ask if c++ opendir,readdir and closedir code can be implemented in visual c++ They're not supported by the library, but you can write versions of them if you really want to using FindFirstFile and FindNextFile.

Member Avatar for vegaseat
0
230
Member Avatar for Acidburn

>does C++ support regular expressions and/or regex matching? Not natively or through the standard library. However, boost has a regex library for C++.

Member Avatar for Narue
0
219
Member Avatar for happyHour

>'not all control paths return a value' [code] if (a == 1) { cout << "now returning a"; return a; } else if ( a < 4) { cout << "function call to b" << ha(b); } } [/code] If a is 1 then you return a, but if a …

Member Avatar for 1o0oBhP
0
163
Member Avatar for chound

>How to show a list of options and allow the user to select the options by using arrow keys and enter. How to include your operating system and compiler in the question because manipulating the arrow keys is platform-dependent.

Member Avatar for vegaseat
0
188
Member Avatar for blackhawk

Borland 4.5 supports the delay function IIRC. Include <dos.h> and pass it the number of milliseconds you want to pause: [code] #include <iostream.h> #include <dos.h> int main() { cout<<"Test 1\n"; delay(2000); // Two second pause cout<<"Test 2\n"; return 0; } [/code]

Member Avatar for vegaseat
0
298
Member Avatar for Acidburn

>I'm wondering if theres a away to just print out the values after the decimal point. There's a library function in <cmath> called modf that breaks up a floating-point value into its constituent pieces. Alternatively, you could copy the value to an int (which truncates the fractional part) and subtract …

Member Avatar for 1o0oBhP
0
414
Member Avatar for helloworld

>when you enter a number it will say you have use 10 k memory That's one hell of a number. >please someone help so me a example, please Please ask a coherent question instead of whatever it was you said in broken english.

Member Avatar for 1o0oBhP
0
165
Member Avatar for chound
Member Avatar for broken_recode

>I simply have to overload square brackets in order for a program to work. Why? It's considerably easier to overload the () operator to take two arguments instead of hack your way to a solution with the [] operator. But if you must know, you need to use a helper …

Member Avatar for Narue
0
2K
Member Avatar for Acidburn

>int chararry[12][10] = {"Jan", "Feb"} Your declaring an array of [b]integers[/b] but trying to initialize it with [b]strings[/b]. Do you see anything wrong with that? If not then maybe a strongly typed language like C++ isn't your cup of tea.

Member Avatar for 1o0oBhP
0
290

The End.