Home Database Mysql Tutorial 教你在vs2010下输出cocos2d

教你在vs2010下输出cocos2d

Jun 07, 2016 pm 03:30 PM
vs2010 xcode output

上次在xcode下,使用printf直接在调试窗口可以看到输出的信息,在vs2010中没有看到,于是查看了源代码,找到函数CCLog void CCLog(const char * pszFormat, ...){ char szBuf[MAX_LEN]; va_list ap; va_start(ap, pszFormat); vsnprintf_s(szBuf, MAX_LEN, M

上次在xcode下,使用printf直接在调试窗口可以看到输出的信息,在vs2010中没有看到,于是查看了源代码,找到函数CCLog

void CCLog(const char * pszFormat, ...)
{
    char szBuf[MAX_LEN];

    va_list ap;
    va_start(ap, pszFormat);
    vsnprintf_s(szBuf, MAX_LEN, MAX_LEN, pszFormat, ap);
    va_end(ap);

    WCHAR wszBuf[MAX_LEN] = {0};
    MultiByteToWideChar(CP_UTF8, 0, szBuf, -1, wszBuf, sizeof(wszBuf));
    OutputDebugStringW(wszBuf);
    OutputDebugStringA("\n");
}
Copy after login


看看它的实现吧。

使用CCLog代替printf后就可以在调试窗口看到输出信息。

在vs2010中 调试->输出,可以调出输出窗口。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1676
14
PHP Tutorial
1278
29
C# Tutorial
1257
24
Recommended configuration for Mac app development using Xcode on Linux Recommended configuration for Mac app development using Xcode on Linux Jul 05, 2023 am 09:45 AM

Overview of recommended configurations for using Xcode on Linux for Mac application development. With the popularity of Mac computers, more and more developers choose to use Xcode for Mac application development. However, Xcode can only run on Mac operating system, which brings some troubles to Linux users. However, some developers hope to use Xcode on Linux for Mac application development. This article will introduce how to configure Xcode on Linux and provide some code examples for reference.

How to output text with line breaks in Go language How to output text with line breaks in Go language Mar 15, 2024 pm 04:15 PM

Go language is a modern, efficient and concise programming language that is widely used in software development in various fields. In the Go language, outputting text with newlines is very simple and can be achieved by using the Println function provided by the fmt package. Below we will introduce in detail how to output text with line breaks in Go language, as well as related code examples. In the Go language, if you want to output text with newlines, you can use the Println function provided by the fmt package. The Println function will output text in

What is the latest key for vs2010 What is the latest key for vs2010 Jul 10, 2023 am 11:09 AM

The latest keys for vs2010 are: 1. YCFHQ-9DWCY-DKV88-T2TMH-G7BHP; 2. YDK44-2WW9W-QV7PM-8P8G8-FTYDF; 3. PQT8W-68YB2-MPY6C-9JV9X-42WJV; 4. 6VPJ7-H3CXH-HBTPT- X4T74-3YVY7 etc.

What software is xcode What software is xcode Dec 08, 2020 pm 04:38 PM

Xcode is an integrated development tool that runs on the operating system Mac OS X. It is an integrated development environment (non-open source) provided by Apple to developers and is used to develop Mac OS X and iOS applications; The fastest way to program. Xcode has a unified user interface design, and coding, testing, and debugging are all completed in a simple window.

iPhone 14 Pro Always-On Display hint may be in Xcode 14 Beta iPhone 14 Pro Always-On Display hint may be in Xcode 14 Beta May 19, 2023 pm 01:56 PM

The upcoming iPhone 14 Pro models will use always-on display technology similar to Apple Watch, and the appearance of the always-on display may be hinted in the latest Xcode14 beta. The Xcode 14 beta has an interesting lock screen interface that removes the details of on-screen widgets when the screen wakes up. The animation shows that ‌iPhone 14 Pro‌ models can remove intricate details from widgets and other lock screen content when the iPhone is locked and the always-on display is active. Also noticed are signs of a black and white version of the widget that was normally in color in the Xcode14 beta, which may have something to do with the always-on display. The latest iOS16 beta also provides wallpapers

Detailed explanation of the difference and significance between full-width and half-width Detailed explanation of the difference and significance between full-width and half-width Mar 25, 2024 pm 04:42 PM

Full-width and half-width are concepts that we often encounter in our daily lives. They have important applications in text typesetting, input methods, programming, etc. The difference between full-width and half-width is not only a difference in form, but also reflects a distinction in different functions and meanings. In-depth exploration of this topic will help us better understand the expression and communication of words. First of all, full-width and half-width are originally derived from traditional typing technology. In the computer age, the concepts of full-width and half-width were introduced into the concept of character encoding. Full-width characters usually occupy one character position, while

In-depth analysis of the ECHO output function in PHP In-depth analysis of the ECHO output function in PHP Mar 27, 2024 pm 03:03 PM

In-depth analysis of the ECHO output function in PHP In PHP, ECHO is a function used to output strings. It is widely used in web development for displaying content to users. This article will provide an in-depth analysis of the ECHO output function in PHP, including its usage, features, and some common tips and precautions. 1. Basic usage of the ECHO function In PHP, the ECHO function is used to output one or more strings. Its basic syntax is: echo "Hello, world!&

What is the vs2010 key? What is the vs2010 key? Jul 10, 2023 am 11:04 AM

The vs2010 keys are: 1. SDJFW-GSDLF-SLDKF-NFWSK-DFKGR; 2. DLKFG-SNGEG-LDFES-FLHNR-SKLJD; 3. PQT8W-68YB2-MPY6C-9JV9X-42WJV; 4. 6VPJ7-H3CXH-HBTPT-X4T74 -3YVY7 etc.

See all articles