That should still produce a type error when you try to compile it.
You did not explain what you're trying to do here (or how exactly your real code does not work - you seem to be implying that your real code does compile), so it's not clear to me what you're trying to copy where. If you intend to copy intobuff, you have your argument mixed up. If you intend to copy out of buff, rubberman is right that you need to initialize it before you use it - otherwise what exactly do you think you're copying?
Also if you intend to copy into buff one obvious problem is that you never do anything with buff before foo ends.
Another potential problem is your use of strcpy, which will lead to a buffer overrun if the given string is too large to fit into the buffer. You should use strncpy instead.
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"