C++ :: Finding Source Of A C2143?

Mar 6, 2013

I am lost trying to find a C2143 missing ; before using Error in all of my cpp files.

///// main.cpp///////
#include <iostream>
#include <time.h>
#include "fight.h"
#include "player.h"
#include "zombie.h"
using namespace std;
int direction;
player R; //instance of player class
combat B; //instance of combat class

[code]....

View 5 Replies


ADVERTISEMENT

C++ :: How To Get Source Code From The Web

May 4, 2014

I am making a game and want to make an updater that grabs the source code from a page on the web. Can this use things that are available to all platforms? It could just be something that grabs the text from the page and executing it (maybe using something like Python's exec() command ?) BTW I'm using mac

View 1 Replies View Related

C++ :: Compile Source Code Into APK

Oct 14, 2014

I want to start developing Android apps in C++, but I do not know what I could use to compile the source code into an apk. I know that C++ is probably not the best choice for Android development, but I already know it and I do not want to learn Java.

View 4 Replies View Related

C++ :: Binary Tree Source?

Jul 12, 2013

I just want to ask if some of you know good source for learning about Binary Trees.

View 2 Replies View Related

C# :: Decompile Back To Source?

Apr 24, 2014

I'm trying to decompile an old software that I need to start using again.

when I tried to open the file in ILSpy I got this message "This file does not contain a managed assembly"

I tried all other decompilers but still no luck.

View 3 Replies View Related

C/C++ :: How To Get Multiple Source Files To Run One After The Other

May 16, 2012

I am trying to run multiple source files but right after the first one finishes running the program closes and doesn't move on ...

View 2 Replies View Related

Visual C++ :: How To Step Into SDK Source

Sep 11, 2014

I am building a project using Ogre3D, and I've downloaded the source code of the SDK.

For whatever reason, the program has got a bug. And I want to know what is going on within the SDK, how do I include the SDK source in Visual Studio 2010?

View 4 Replies View Related

C++ :: Source Code For LZW Decompression?

Dec 16, 2013

Is there source code for LZW decompression in C++ available? Not C.

I'm looking for an implementation of the LZW decompression algorithm in C++ which can take an input buffer and not a file. if one exists?

View 6 Replies View Related

C :: Accessing Pointers From Other Source Files

Oct 16, 2013

I've recently been learning GTK (though this question is not specific to GTK), and came across a situation that I was unsure how to best handle. Essentially, I've defined several pointers in one source file, and I want to access those pointers from other source files.

The structure of my GTK programs generally follow this pattern:

- "main.c": Define the main window and run GTK main
- "create_window.c": Create and arrange widget pointers in the main window
- "program_functions.c": All other source code for the project (several source files in reality)

In "create_window.c", I declare and define all my widget pointers (e.g. label). If I need to modify those widgets in "program_functions.c" for any reason (say, to change the value of a label), I need access to the pointers created in "create_window.c".

My first thought was to create a global struct of pointers in "create_window.c", and extern that struct to the other source files that need access to the pointers. The thing I don't like about this approach is spreading globals across my program.

My second idea was to create access functions in "create_window.c" where the necessary pointers are statically stored. The first time I call this function (immediately after creating a widget), a static copy of that pointer is stored in the function. Each time afterwards when I call that function (from other source files), I simply use that static pointer to access the widget of interest.

Example:
Code: void edit_label_1(GtkWidget *label_set, const char *string)
{
static GtkWidget *label = NULL;

[Code].....

Are either one of the approaches considered acceptable by standard practice?

View 2 Replies View Related

C :: Declaration Of Array In Another Source File

May 5, 2014

I was going through a code where i found the definition of int array[63] in one of the source files. But i also found the declaration as extern int array[66] in another source file. This is clearly wrong, but my doubt is how the compiler compiled it. It should have thrown error. In case if it compiles then what will be the behavior of the system? Will it be normal or some undefined behavior?

View 3 Replies View Related

C :: Pages Handling In Embedded Source

Jul 9, 2013

I'ma firmware writing, and usually use only C language (not my decision, unfortunately!).In many application we've only a text display (2 rows 16 columns ascii char, or 4x20 or something else). But the question can be used also for semi graphics panel and so on.

I'm looking for an example / library / sourcecode to handling all the pages in the project. When the program start you've a 1st page (wth info abt release, hallo screen and so on), then with a arrows buttons you can navigate throught many pages. Some of these can be called by SW (or HW) events. (Button, alarm, end of job ...) In abt 20 year of experience3 I?ve seen many type of different code.

View 1 Replies View Related

C :: Compile Multiple Source Files

Mar 7, 2013

How I can compile multiple source file in visual studio 2012 ???

View 1 Replies View Related

C++ :: How To Put String Content Into Source Code

May 23, 2013

I'm trying to write a program that prompts the user to enter a math expression (i.e 2*x + x*x) and a value of x. Then generate the value of y. My real question is: Is there a way to put the content of a string into the source code?

Example:

string math_function;
double x, y;
cout << "Enter the function: ";
getline(cin, math_function);

[Code] .....

View 4 Replies View Related

C++ :: How To Properly Cite A Source In Code

May 24, 2013

For example, if one researched how to deep copy a map container and paraphrased a solution from a website, what is the proper format? Are there standards for citing works in code?

I am currently only citing the link to the source in my personal code and explaining what algorithm the source contains.

View 4 Replies View Related

C++ :: Making Exe File From Source Code?

Sep 4, 2013

I use a programming language called layout which nobody here has probably ever heard of. It was discontinued over 15 years years ago but it was a very visual & easy to use piece of software - no coding required. In fact once you name all the variables on cards (forms) from then on it's just mouse clicking & occassionaly typing a number if required. It used blackboxes in a flowchart arrangement which were pre-done code for doing just about anything. i.e opening windows, handling numbers & text, files etc. I have written many programs with it including database management, quoting software & currently use it in my business to track my jobs & do invoicing & ordering. It's a pity it wasn't updated & still around today.

[URL]

Back to the problem. Being a 16 bit program it was written to run on Windows 3.1 but still works on Windows 7!! as long as it is the 32 bit version. I need to write a program that will run on 64 bit W7 without resorting to using a virtual PC solution. I have tried to find something similar that I might be able to use instead but so far nothing comes close to Layout. I just remembered today that layout can produce not only .exe programs but also various versions of C/C++ including visual c++. So I got this idea that if I could get those files I might be able to stick them into a C compiler program to re-make a "modern" exe file.

I could just do a simple sample program & send the source code to them to see if it works on a 64 bit version of Windows 7. how I can do this myself to produce a working exe file.

View 5 Replies View Related

C# :: How To Get Source Path Of Selected File

Jun 5, 2014

how to get source path of selected file.

for example :

selected image in E:/

E:ewfolderillustration.jpg

application - asp.net(C#)

View 4 Replies View Related

C/C++ :: Source Code Containing Struct Pointer

Mar 9, 2015

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
struct stock{
char symbol[5];
int quantity;
float price;

[Code] ....

- In the final output
Value
%.2f

- How is the final pointer reference at line33 leading to the output %.2f ? (i do understand that the %% is used to display a %] ....

View 1 Replies View Related

Visual C++ :: How To Use A Different File For The Source In The Debugger

Nov 3, 2013

Visual studio 2012

I have a project that has a few .asm files (assembly language code), I have the compiler/assembler set to create a list file for the assembly code and would like the debugger to use the .lst file for the source instead of the .asm files because in the .asm files the macros are not expanded like they are in the .lst files which makes debugging difficult sometimes.

View 1 Replies View Related

Visual C++ :: How To Convert MFC Dependent Source To Non-MFC

Feb 25, 2013

IDE = Visual Studio 2008 Express

I am a novice programmer(still...) , and I am trying to build the Code Project project located at this address:

[URL] .....

The project page is titled " Remote Control PCs ".

I would like to use this program plus I wanted to practice programming using the code base. However, I don't have MFC so I thought I would just convert it to non-MFC.

For example, It seems to me that any class inherited from MFC would need to be reimplemented. I think I also need to reimplement any code that uses "stdafx.h"

I built a custom project out of the zlib library and compiled it as a Windows library with the /MT settings. Both 32 and 64 bit library files, in Release and Debug mode, are included. The ZLIB.H and ZCONF.H files are also included. For examples of single-threaded usage, see the CZLib class. For examples of multi-threaded usage, see the classes CDriveMultiThreadedCompression, CMultiThreadedCompression, and CZLib.

1)How should I go about compiling this zlib custom project?

2)Where does the /MT option go ?

3)How do I use the output ( zlib.lib - I guess)?

View 9 Replies View Related

C++ :: How To Make Source Code Into Functional Program

Jun 10, 2013

How to make a source code into a functional program that a user can open and use without coming across the source code and building or running it.

View 1 Replies View Related

C :: Open Source For Conversion From UTF8 To Unicode

Mar 8, 2013

Is there any open sources available to do the conversion from UTF8 to Unicode(16-bit) and vice versa..

Also i would like to know how can i integrate that library with my code.

View 1 Replies View Related

C :: Including Source File Twice But With Include Guard

Jun 14, 2014

I have four source files. The main source file includes two other source files. The two other source files both include the fourth source file. In the fourth source file I have an include guard. Will the code from the fourth source file exist in two locations in the compiled code? Is this something that is compiler dependent? An example of this is shown in the code below.

Code:

// filename: main.c
#include "source1.c"
#include "source2.c"

[Code]....

View 4 Replies View Related

C :: How To Share Imported DLL Functions Between Source Files

Nov 24, 2013

In general, my problem is that I've been trying to reorganize the project I and my group are working on into separate project files. Everything was working perfectly fine before, but now I'm facing the wrath of undefined reference errors when I try to call my DLL functions.

I have them declared and included in the central header file here :

Code:

/* DLL functions */
typedef void ( * t_wait )( int milliseconds, const int frames_per_seconds );
typedef clock_t ( * ft_timer )( int command, t_timer * timer_object ); /* clock_t is usually defined as long */
typedef void ( * t_SDL_errorexit )( const char * message );
typedef SDL_Surface * ( * t_load_image )( char * image_path, unsigned is_transparent );

[Code]...

Then I have them imported here :

Code:
/* ******************************************************** */
/* ********* win_error( char *, bool ) ********* */
/* ******************************************************** */
/* - Displays a GUI for a windows specific error message, */
/* pass true to it to have it exit the program, pass false */
/* to have it continue */
/* ******************************************************** */
extern void win_error( char * message, bool is_exit )
{
/* Note : win_error uses the Win32 Api */
/* ********************************** */
char buffer[BUFSIZ] = { 0 }; /*

[code]...

This doesn't work, as my compiler sees it that I am trying to call invalid functions, whereas I have made sure to import the functions before calling. Obviously my compiler can't tell that, and is trying to protect me from calling them.

The source files are compiled as C++, but I'm using C-style code instead of true C++ code.

Obviously I'm using Windows style DLL linking, but if the only ways to share imported functions are non-standard, only post ways that will work on as low as Windows XP.

I have tried to statically link them before, but that led to a problem that I posted a while back. Which led me to dynamically linking, which was problem-free until I separated my code into separate files.

View 13 Replies View Related

C++ :: Program Needs To Compile Various Source Files At Runtime

Oct 30, 2014

My program needs to compile various source files at runtime.What is the most elegant way to compile cross platform with g++ from within my program? Is there a gcc-library I can use? I know that I could use popen() to open a Unix pipe and call g++ as command line tool. But first it isn't really cross platform and second it doesn't seem elegant to me.

View 10 Replies View Related

C++ :: How To Properly Overload From A Stream SOURCE Perspective

May 11, 2014

I'm working on a class that needs to read from cin, but also needs to read the input twice. I've decided that the mechanism I want to use is to write a simple wrapper class that will read from cin, then write to a tempporary file in the operator>> method, then it will, when the application calls seekg(0) to reset the file to the beginning of the file, my helper class will just switch the underlying stream from cin to the temporary file, then return reads from there.

I know there are some underlying issues to address if I need MORE functionality later, but for now, I know the basic functionality I need and from a logic level and how to make that happen. What I don't know how to do is handle the syntax of overloading the operator>> method.

I'm looking for a good syntax reference, or some sample code of how to properly overload this from a stream SOURCE perspective. I've written plenty of classes that overload operator>> from the DESTINATION perspective, but the exact same prototype doesn't work, at least not for primitives.

View 3 Replies View Related

C++ :: Reading Source Code From Uncompleted Files?

Jun 9, 2013

I know it sounds strange but I've seen things that have files which contain source code (usually in something in Python or such) and how this is read on run-time?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved