5,676 Posted Topics
Re: Step backwards? You mean to say C# is better than C? How so? If you feel C will be less restrictive than C#, sounds like a step forward to me. I agree with your decision - it seems like a good one to me. | |
Re: [QUOTE=GrimJack;]Jeez - Ron Paul is right up there with Palin, bachman and santorum for crazy:[/quote] [LIST] [*][b]he also thinks the "War on Christmas" is real[/b] -- it is. [b]and that the separation of church and state is a myth[/b] -- explanation needed. Separation doesn't/shouldn't/never did exist? What's this mean? [b]He … | |
Re: [QUOTE=radiata;]And I'm having issues with my code. Can't seem to figure it out...[/QUOTE] Any reason you won't tell us what those issues are? Do you think knowing them might help us understand? | |
Re: 1) Move the OutputData() function above addMoney() 2) Add prototypes (look it up) of your functions at the top of the program | |
Re: [url=http://www.gidnetwork.com/b-38.html]Format[/url] your code so it can be read and followed easily by others. You calculated the values in the functions but never returned them. [edit]Sorry, your formatting caused me to misread the code. See?[/edit] | |
Re: Use arrays for the strings. | |
Re: [QUOTE=vicious217;]I am working on a project and i need to have the colume of 3 boxes but I keep getting errors when I try to compile. Can anyone help and see what I am doing wrong? [/QUOTE] Sure: 1) No [url=http://www.gidnetwork.com/b-38.html]formatting[/url] making the code difficult to follow. 2) No indication … | |
Re: [QUOTE=nidajaffri;1609581]my confusion is as syntax of thread creation is pthread_create( pthread_t *thread, const pthread_attr_t *attr, void *(*func)(void *), void *arg); how i use two arguments int argc,char * argv[]) in it[/QUOTE] CODE TAGS!!!! Use them! Which parameter in the [ICODE]pthread_create()[/ICODE] call is the [I]*argv[][/I] parameter? Same with [I]argc[/I]. Start there. | |
Re: [ICODE]if (a==a||b==b||c==c||d==d)[/ICODE] When is the variable [B]a[/B] ever not equal to the variable [B]a[/B]? When is the variable [B]b[/B] ever not equal to the variable [B]b[/B]? When is the variable [B]c[/B] ever not equal to the variable [B]c[/B]? When is the variable [B]d[/B] ever not equal to the variable [B]d[/B]? … | |
Re: This is the 9th thread started by this member. Every one is just a program description. Never posted a second message with code, questions, nothing. In fact never one followup post. He obviously is posting just to post and needs no help at all. | |
Re: [QUOTE=Prelektro;]i'm kinda beginner. [/QUOTE] It shows. Beginners rarely bother to read the [B]Member Rules[/B] nor the sticky post [B]Read This Before Posting[/B] before asking a question. | |
Re: [QUOTE=Niharika Jain;1612960]But you have already called it in the if loop! What's the problem?[/QUOTE] What's the problem? 1) [url=http://www.gidnetwork.com/b-38.html]Formatting[/url] is non-existent. 2) [url=http://www.gidnetwork.com/b-66.html]main()[/url] is wrong. 3) [url=http://www.gidnetwork.com/b-57.html]fflush(stdin)[/url] is undefined. 4) Using [url=http://www.gidnetwork.com/b-60.html]scanf[/url] to read a character -- see the entire [url=http://www.gidnetwork.com/b-59.html]scanf series[/url] for maximum info. That's what I see. | |
Re: Here are the problems I see: [I]#include <conio.h>[/I] - non-standard, useless in your case [I]void main ()[/I] - [url=http://www.gidnetwork.com/b-66.html]see this[/url] [I]clrscr()[/I] - old, non-standard, useless in your case [I]getch()[/I] - non-standard, use a standard C function like [ICODE]getchar()[/ICODE] [I]formatting[/I] - non-existent, [url=http://www.gidnetwork.com/b-38.html]see this[/url] And lastly, telling us "[I]it's not working[/I]" … | |
Re: We can't understand what this is supposed to do either. There is no useful context. | |
Re: Tell you what. [B]You[/B] comment each line whith what you think it means and we'll help you correct it. And use CODE tags!!! | |
Re: Try using an array [iCODE]team Team[8][/iCODE] to make you coding easier and more compact. You won't need that godawful nested IF structure. ![]() | |
Re: [url=http://lmgtfy.com/?q=vb6+while+wend]Try This[/url] | |
Re: Look up function similar to [I]findfirstfile()[/I] and [I]findnextfile()[/I] for your compiler. | |
Re: I don't see any down-reps for you in the past month. All + rep back to June 10, where you must have been doing something people didn't like. On the other hand [I]you[/I] have been giving bad rep to a bunch of members in a Geek's Lounge thread. | |
Re: Get string length. Start at the end of the string. If character is a SPACE, back up 1 character and repeat When the character is not a SPACE change the next char (the last SPACE seen) to \0 | |
Re: Compare them one by one. Count how many times there is a mismatch. If it's two or less, there's only one different value. | |
Re: [QUOTE=clockmaker;1611876]You are so close, you have it solved, but your problem is that you need one last line of code for your GCD function: [code] GCD = X End Function [/code][/QUOTE] Thanks for helping. I'm sure the OP has been waiting for the past 6 years for you add that … | |
Re: [QUOTE=wd.hamaden;1611151]I wrote two programs, but I'm in dire need of the third and be honest with you I could not at all to write the third program[/QUOTE] 1) Learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] so it can be read and followed easily 2) [url=http://www.gidnetwork.com/b-66.html]See this[/url] 3) We won't write it for … | |
Re: [I]cout[/I] is the easiest debugging tool you have. You suspect the file is not being read? After the open, display the status of the open -- did it work? After each read, display the data read -- is it correct? You suspect [B]u[/B] and [B]uc[/B] don't work? Display values before … | |
Re: A very convoluted confusing question. [QUOTE=ineedsomehelp:3;]Ok, now I'm feeling dumb and all, but I need help on how to a print a secret random code if I said yes on cheat, and I should not let it be printed if the answer on the cheat is no(but it should still … | |
Re: [QUOTE=vergil1983;][code]int main() { char call1, call2, call3, call4, call5, call6; cout<<"Enter a character.\n"; cin>>call1>>call2>>call3>>call4>>call5>>call6; callFunction(call1, call2, call3, call4,call5,call6); return 0; } [/CODE][/QUOTE] Your [I]main()[/I] makes no sense. You output a prompt asking for [B]a[/B] character. Then you input 6 characters. Why? What if I enter "[b]smiley[/b]"? | |
Re: No thank you. I'm done with school. Now if you need help, ask a valid question. | |
Re: [QUOTE=ben1996123;]I've been told to return 0 at the end in pretty much every tutorial I've seen but I don't because I have no idea what the point of it is and it works fine without it.[/QUOTE] Then go into history or literature and forget programming. If every tutorial says do … | |
Re: Start by learning C++. Get the basics down and then this will be easy. | |
Re: Of course. Delete the node you are pointing to. The question doesn't say you need to clean up the next-pointer in the previous node, which you can't do, but too bad. Stupid requirements cause problems. | |
Re: SO what do you want included in the loop? Point to the line that needs to be inside to loop that isn't already. Finish your do-while loop. In fact, start over. Get the program running in small pieces, stop trying to write the whole thing and clean up the problems … | |
It is really difficult to make comments on multiple posts which happens often enough to be a pain in the ass since you removed the multi-quote button. PLEASE give it back! | |
![]() | Re: Where does your loop actually start? Where do you want the loop to start? |
Re: You're going to have to contact the author of the code and get a copy of [I]inputs.h[/I] from him. And that's not a prototype. It's an include file. If the code really came out of the book, the include file is there, too. | |
Re: [QUOTE=sfuo;]Here is a rough example of why you would want to use it. If you comment out [ICODE]fflush(stdin);[/ICODE] then it skips asking for input every second one, but with it you get asked every time. [/QUOTE] Completely wrong! [ICODE]fflush()[/ICODE] is defined [B]only[/B] for output streams. [I]stdin[/I] is not an output … | |
Re: Were 3 identical answers really necessary? :icon_rolleyes: | |
Re: [QUOTE=dotancohen;]I am looking to learn best practices for working with strings. Two issues that I have with strncat are that it is difficult to calculate how much space to allow,[/quote] Why? [ICODE]strlen(str1) + n + 1[/ICODE] is exactly how much space is needed. [QUOTE=dotancohen;] and that there may not be … | |
Re: [QUOTE=dotancohen;1610287]When dealing with pointers, the "&" sign is called the address-of urinary operator. Knowing it's name sure helps to understand when to use it. Is "*" a urinary operator as well, and if so, what is its name? If it is not an operator, then what is it? Thanks.[/QUOTE] [url=http://en.wikipedia.org/wiki/Urinary_system]Urinary[/url]? … | |
Re: [QUOTE=jaimee;1610013]How can I start doing a program using pop-up menus in C++? with the choices which are clickable? which code I should use?thank you.[/QUOTE] Learn to use the EDIT button. Don't post twice. | |
Re: [QUOTE=sfuo;1610225]If its C++ then you should post in the C++ forum.[/QUOTE] Sorry, my fault. | |
Re: [QUOTE=CloudZELL91;]........................... am asking ...if how to run this properly....when errors become 0 and =warning is 8 it wont run.........[/QUOTE] Fix the warnings. Use CODE Tags And use [url=http://www.gidnetwork.com/b-38.html]proper formatting[/url] | |
Re: First thing is to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] properly. That will prevent the errors you have now, never to return again. Well, almost never... | |
Re: [B]Nathan[/B] is partially correct. Based on your code and assumed knowledge 1) read file 1 into an array. 2) read file 2 into an array. 3) merge the 2 arrays into a third. 4) write the 3rd array into file 3 5) Do not use [ICODE]sort[/ICODE] in C++ because I'm … | |
Re: 1) until you completely understand how paths work in relation to your IDE vs Program, use the full path. 2) You don't check to see if the file was opened. It probably was, just not where you expected. Always error check after anything that might not work. | |
Re: Because, obviously, you did it wrong. Don't you think that showing us what you tried to do would give us some helpful information? This is not the Psychic Programmer's Forum. | |
Re: [QUOTE=Blacksheepjnr;]Hi I want to know : 1 how to add a persons name to the end of a dynamic array? 2 how to check if the array is full, and if so to print a constant string? 3 how to search in a dynamic array for a specific name and … | |
Re: OK Guys, enough showing off. Let's [I]help[/I] [B]Sonia11[/B] and less trying to impress her with your prowess. I'll bet she's not interested in your C++ muscle and just wants to finish her project. | |
Re: [QUOTE=vin24;]for example I want create a textfile named as text1.txt and another textfile text2.txt. What possibly is the solution to prevent the 1st txt file to be overwritten by the 2nd txt file.[/QUOTE] Don't write the same thing to both files. Why would [I]text1.txt[/I] get overwritten by [I]text2.txt[/I]? they are … | |
Re: [QUOTE=pseudorandom21;]I need to know a bit about this "default int" thing in C. What I mean is, is this actually ok and with what version of C is it ok?[/quote] I guess my question would be "why?" If you know [ICODE]int main()[/ICODE] will always work, why would you need to … |
The End.