Isn't your question vague? Avoid forcing people who want to help you to assume anything.
Isn't your question vague? Avoid forcing people who want to help you to assume anything.
Any tips welcome! Even if it doesnt solve this. =D
Codes along with relevant comments always get more help!
Nope the problem just states to print charts showing the conversions. - Print the outputs in a neat tabular format that minimizes the number of lines of output while remaining readable.
Sorry, but I'm not able to understand the format of the output you want from the program. I'll be able to help if you describe in a bit detail.
Do you mean a bar chart? Then scale those values by a suitable factor and then display the results. For e.g. for Celsius to Fahrenheit, take 0 to 100 on X-axis, and 32 to 212 on Y-axis. Scale the values so that the chart fits into the console and show the variations. Note: You're expected to display the scale while plotting such bar charts. i.e. 1 '*' = x degree Celsius and so on (where you're using columns of the character '*' as the vertical bars).
Inside the if blocks that you've commented, wait for a character to be pressed by the user. That would print all the results on the console, and at the same time, the user will be able to view them page-wise.
Which header file library are you using?
Where should I state my do-while loop and how do I go about counting the score to be displayed as three separate scores " wins, losses, ties" do I need to ++ each case as a win,loss,tie?
Insert the switch(userChoice) into a do-while loop and specify a break condition for the same. You'll have to increment the wins, loses and ties in the different cases of switch(computerChoice). Hope this helped.
vijayan121 has just provided the functions, you'll have to adapt them according to your main code and use them. His functions will compile, but how do you expect them to run?!
Please be more specific. Specify the format of the records in the text file. Or else, state what exact problem you're facing in doing the above task.
Use code tags :D
thanks you all for the reply to my project idea.
made up my mind now what to do.
THANKS.
Then mark it as solved. Use the link that appears at the end of the last post in this thread.
...
What does this mean?
Oh yes. I remember seeing the posts of 'happygeek'. I didn't know that Davey was his real name.
Oh, a good enough peep into the reality, ~s.o.s~. There were a lot of things in your post that I didn't know earlier. I appreciate your post because that gave me a clearer view of the situation. Let me go over the options. I might come up with something. :)
I might try and make one though if there was like a guide to making good tutorials by Davey himself posted in the coffee house or even in the tech area.
Well said. I don't know him. Should I understand that he is an admin/staff writer?
I mean the tutorials section is a bit thin on things
Exactly.
why not make a section on Wikipedia itself and have a link to it?
Great.
choosing you would have the right to contribute would not be a trivial task
The links posted by users would require that the mods accept it only if it is good. This would keep it more organized. Also they should be categorized, so that for example if the users want to access the links related to one particular topic in C, they can look up in the different folders and keep on narrowing the search until they've found what they intended to.
What do you think about categorizing the links to good articles, references, tutorials etc.?
actually i don't know either what DHCP means
Neither do I ;). But classifying the links (and keeping them updated too) seems the right way to me..
Good idea. But I'm not aware of how much additional work that means for the moderators..
maybe these definitions can be given by forum members, and checked by mods...
True. But, we cannot just build an encyclopedia. We can instead maintain a database of links for specific topics. It is similiar to the 'Read Me: ' threads at the beginning of C, C++ and Java (I'm not much aware about the other forums)forums. The only desirable modification is the in-depth topicwise classification of the links.
But its related to the problem (anymore).
Does that mean anything?
the basics in c++ i did solitiare game and tic tac toe game so far
I forgot to put this inside quotes.
If you are interested in game programming learn OpenGL. If you already know it, try making games like bingo, reversi/othello, go...
Apart from games, you can make many management systems like attendance management system, employee management system, library management system etc.
the basics in c++ i did solitiare game and tic tac toe game so far
If you are interested in game programming learn OpenGL. If you already know it, try making games like bingo, reversi/othello, go...
You can do that with the help of multi threading in C++ and Java. In C, no such feature exists. Although, some libraries for C might be supporting multi threading. I'm not sure.
And one more thing, I've read somewhere over here that C++ is the de facto language for game programming. So, if you are interested in game development only, then I think you should focus on learning C++.
Yes, I thought so. Now, as he has specified, changing the memory model is inapplicable to this case.
What efforts have you put in so far? Please post any coding you have done using code tags.
I don't know about the best solution. But you can improve the existing program by using long int instead of int and also changing the memory model to large or huge.
I've a code , but there is a part I didn't undestand it.
Can u help me to undestand it?
I am writing the part I didn't understand it by red color:
The red part sorts the integer array intArray and then prints the sorted contents... Anything more specific you want to know about the algorithm? Then google for "bubble sort".
i want to know whether the two problems are same or different
The problem is the same. Solutions are worked out in different manner.
Apart from this, I could not make out from your post what problem you are facing. Please mention if I've misunderstood something.
You said this:
i have a doubt regarding the permutations of a given string and permutations of first N natural numbers...
But afterwards, you didn't mention the doubt.
sOperator gets its value using this statement.
sOperator = (String) arg;
If your problem is solved, mark this thread as solved by clicking on the link below the last post in this thread.
Your reply was more specific. I just gave an example...
And yes,
You can either sort the numbers stored in each structure or sort the nth elements all the structure variables.
This is a golden truth.
Thank you for the compliments :)
This is your first post. But, the next time you post your code, please use code tags so that the users can view the code along with proper alignment.
if (isFixReg)
sText2 = (String) arg;
else
sText2 = text.getText() + arg;
text.setText(sText2);
isFixReg = false;
This indicates that if isFixReg is true, then no other operand (argument) is needed to be displayed (For eg when memory/clear buttons or operators are selected). If isFixReg is false, then another argument is to be added to the text being displayed.
For eg if you press 21, then when you press 2 then isFixReg is true and afterwards when you press 1 then isFixReg is false because it has to display the previous argument (which was 2) also to display '21' and not only '1'. I hope I'm clear.
Looks like darkagn and I replied at about the same time. I hadn't refreshed my page while typing my reply.
The comment on top is the problem.
I didn't understand that.
Also, if you've no more problems, then mark the thread as solved.
i tried several things BUT nothing works
Post atleast one such thing (code). We'll try to make it work.
Maybe some problem with the access specifier keywords used for that particular function. Nothing else can explain such a behaviour. Atleast post your .h file so that it makes debugging easy.
First is there a better way to do it than a series of bool functions?
No, I can't think of a better way. danzona has given an excellent peice of advice. Stick to it.
in determining all legal moves, and then assigning a random number, I run into some errors.
In doing these logically simple tasks, so you won't get any logical errors. You might get syntax errors, which if you post them here, we can help you out. Keep the good work going!!
a.out
What is that?
Use code tags & re-post the code along with the errors you are getting..
Just state in the pseudocode that x=x+20 results in incrementing the value of x by 20. Nothing else would be required.
I think you've not learnt the basics yet... First the value of LHS expression is evaluated and then it is assigned to the variable on RHS... So, first X+20 (50) is evaluated & then it (50) is assigned to X. The procedure simply results in incrementing the value of X by 20. Other values remain unchanged.
Use code tags :D
the problem is that i want a series of integers and passes them one at a time to function even.
If you mean that you want to implement the same algorithm for a series of numbers, use arrays. If you want to pass them one at a time to the function, then put the function call inside a loop.
We will try to help you once you have selected a topic and have a problem. For selecting the topic, introspect. Have an idea about the level of difficulty of you are willing to handle. Then try google for finalizing the topic.
Also, this thread contains nothing specific to C++ & so, it should be posted in the C forum.
If you want to modify the original program minimally,
*ptr + 1 = 20; // set arr[1] to 20
should be rewritten as
*(ptr + 1) = 20; // set arr[1] to 20
This is because * has higher precedence than +. Also interchange lines 13 & 14.
while(ptr >= arr)
{
cout << *ptr << endl;
ptr--;
}
must be modified to
ptr=arr;
while(ptr <= arr+2)
{
cout << *ptr << endl;
ptr++;
}
What nonsense code have you submitted?! I fully agree with Ancient Dragon.
Atleast show your code (efforts) & specify where you are stuck up. You are expecting that someone will write the entire code for you. You've not even specified what your specific problem is about.
Write a program to find the number of times that a given word(i.e. a short string) occurs in the sentence(i.e. in a sentence!).
Read data from the standard input. the first line is a single word, which is followed by general text on the second line. read both up to a newline character, and insert a terminating null before processing.
Typical output should be:
The word is "the".
The sentence is "the cat sat on the mat".
The word occurs 2 times.
The error implies that there is some reference to main inside the functions in the file you are trying to compile. As you have not defined main, it will not compile. Try to put the file here so that the error can be located.
hello
does anyone knows the meaning of the errorundefined reference to main.
i'm getting the error when trying to compile a file without a main function with -Wall option