noisiv 1
noisiv
Manwe Work 1
Manwe Work
kralhakan2009 1
kralhakan2009
Bodyguardd 1
Bodyguardd
Vahsi Uzman 1
Vahsi Uzman
Reklam vermek için turkmmo@gmail.com

Quick Voice Chat

  • Konuyu başlatan Konuyu başlatan durda
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 33
  • Görüntüleme Görüntüleme 4K
Konu için teşekkürler eline sağlık 2 adet sorum var

#if defined(VOICE_CHAT)
defineyi böyle değilde
#ifdef VOICE_CHAT
böyle olsa aralarındaki fark ne ?


VoiceMessage.h
C++:
#ifndef __VOICE_CHAT__
#define __VOICE_CHAT__
#pragma once
#if defined(VOICE_CHAT)
namespace VoiceMessage {
    struct voicemsg {std::string msg, dir;};
    const std::vector<voicemsg> voiceinfo
    {
        {"Go go go!", "BGM/voicechat/gomsg.mp3"},
        {"Fuck you!", "BGM/voicechat/fuckyou.mp3"},
        {"Mission Failed!", "BGM/voicechat/missionfailed.mp3"},
        {"Okey, Let's Go!", "BGM/voicechat/okletsgo.mp3"},
        {"Negative!", "BGM/voicechat/negative.mp3"},
        {"Follow me.", "BGM/voicechat/followme.mp3"},
    };
}
#endif
#endif

böyle olması gerekmez mi ? diğer .h dosyaları böyle de
 
Konu için teşekkürler eline sağlık 2 adet sorum var

#if defined(VOICE_CHAT)
defineyi böyle değilde
#ifdef VOICE_CHAT
böyle olsa aralarındaki fark ne ?


VoiceMessage.h
C++:
#ifndef __VOICE_CHAT__
#define __VOICE_CHAT__
#pragma once
#if defined(VOICE_CHAT)
namespace VoiceMessage {
    struct voicemsg {std::string msg, dir;};
    const std::vector<voicemsg> voiceinfo
    {
        {"Go go go!", "BGM/voicechat/gomsg.mp3"},
        {"Fuck you!", "BGM/voicechat/fuckyou.mp3"},
        {"Mission Failed!", "BGM/voicechat/missionfailed.mp3"},
        {"Okey, Let's Go!", "BGM/voicechat/okletsgo.mp3"},
        {"Negative!", "BGM/voicechat/negative.mp3"},
        {"Follow me.", "BGM/voicechat/followme.mp3"},
    };
}
#endif
#endif

böyle olması gerekmez mi ?
pragma once zaten yazdığın işe yarıyor. ifdef ile defined aynı
 
Konu için teşekkürler eline sağlık 2 adet sorum var

#if defined(VOICE_CHAT)
defineyi böyle değilde
#ifdef VOICE_CHAT
böyle olsa aralarındaki fark ne ?


VoiceMessage.h
C++:
#ifndef __VOICE_CHAT__
#define __VOICE_CHAT__
#pragma once
#if defined(VOICE_CHAT)
namespace VoiceMessage {
    struct voicemsg {std::string msg, dir;};
    const std::vector<voicemsg> voiceinfo
    {
        {"Go go go!", "BGM/voicechat/gomsg.mp3"},
        {"Fuck you!", "BGM/voicechat/fuckyou.mp3"},
        {"Mission Failed!", "BGM/voicechat/missionfailed.mp3"},
        {"Okey, Let's Go!", "BGM/voicechat/okletsgo.mp3"},
        {"Negative!", "BGM/voicechat/negative.mp3"},
        {"Follow me.", "BGM/voicechat/followme.mp3"},
    };
}
#endif
#endif

böyle olması gerekmez mi ? diğer .h dosyaları böyle de
#ifndef __VOICE_CHAT__
#define __VOICE_CHAT__
ile

#pragma once nin işlevleri aynı classın sadece 1 kere tanımlanması sağlıyor, yanlış hatırlamıyorsam pragma once 2010 da v100 ile gelmişti metin2 ondan daha önce geliştirildiği için kullanılamadı, tavsiyem modern C++ kullan ve mt2 ye takılı kalma.
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst