Presumably, you are trying to paste into the Terminal using middle-click.
Generally speaking, if you Copy with the application menu, context menu (which usually just triggers the application menu), or ^c (which also usually triggers the app menu), the results are stored to the "Clipboard" selection and can be Pasted with ^v or a corresponding menu.
If you Copy by highlighting text with the mouse, the results are stored to the "Primary" selection and can be Pasted by middle-clicking the target window.
If you select text in your application with the mouse, then use ^c to Copy it manually, you will stored the results in the "Primary" selection with the mouse, and the "Clipboard" selection with the ^c, so they will both match and you don't get confused.
But, if you select text in your app with the keyboard, then hit ^c, and subsequently select some other text (like a target selection to overwrite) the result will not be stored in the "Primary" selection and you will not get the copied text. You will not be able to middle-click to Paste the copied text, but you can use the Terminal application menu or context menu to Paste from the "Clipboard" selection.
Some applications will also fill the "Primary" selection when you Copy to the "Clipboard". This is non-standard behavior and should be avoided and not relied upon.