Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Hilfe bei austauschen von zeichen eines textes.

Empfohlene Antworten

Veröffentlicht

Also ich habe hier mein kleines Programm, es tut im großen und ganzen nihct das was ich mir gedacht habe was es eigentlich tuen soll.

Ich sag schon mal im vorraus die main funktion und co is sehr einfach nur geschrieben , da ich eigentlich nur die Funktion gerade brauche und das nur zum testen sein sollte.

Ich komme aber nicht auf den fehler warum es mir nur [at] [at] , .... ausgiebt.

Naja bitte vll kann mir ja wer helfen.

Am ende soll es von einem eingegebenen text ( hier einfach nur ein test), alle @ austauschen zu [at] .

#include <stdio.h>


char text[] = {'d','1','@','2'};

char text_new[10];

int counter;

int counter2 = 0;

int counter_at = 0;


main()

{

    printf("Text: ");

    for(counter = 0; counter <4; counter++)

	printf("%c", text[counter]);

    printf("\n");	

	for(counter = 0; counter <= 4; counter++)

	{	

		counter2 = counter + (4 * counter_at);

		if(text[counter] = '@')

		{     

			text_new[counter2] = '['; 

			text_new[counter2 + 1] = 'a'; 

			text_new[counter2 + 2] = 't'; 

			text_new[counter2 + 3] = ']'; 

			counter_at = counter_at +1;

			printf("o");

		}	

		else

		text_new[counter2] = text[counter];

	}

	printf("Text_new: ");

	for(counter = 0; counter <= 9; counter++)

	printf("%c",text_new[counter]);	

	printf("\nSo viele @: %d", counter_at);

	return 0;

}	

danke :)

du weißt gar net wie lang i überlegt hab und net auf dne fejler gekommen bin,

daran hab ich gar nicht mehr gedacht .

danke vielmals :)

ok neues problem nun , nun funktioniert so weit alles .

Naja fast ^^

Ich hab das ganze compiliert und es geht,

nun muss ich es aber mit GCC auch noch compilieren und da worft er mir einen fehler:

qq.c:14: warning: return type default to 'int'.

was könnte da nun der fehler sein ?

//

OK bin schon auf die lösung gekommen ^^. hab statt "int main()" nur main() geschrieben.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.