49,761 Topics
| |
I'm trying to copy a string into a character array to be used in .write(). Here is a bit of my code to show you what I mean: [CODE] //input_buffer is a string that is determined during runtime int length = 5; char * buffer = new char [input_buffer.size()]; buffer … | |
Hello, I'm trying to use a string (filepath) with the windows IFileOperation interface. Only, the CopyItem method calls for the filepath as a PCWSTR. I've been googling and trying different things for half an hour but for the life of me I can't find out how to convert this string. … | |
I want to make a loop that will keep asking for an input until 0 is entered into the input. How would I go about doing this | |
I need to populate the bynarytree with data from a file, an .txt. How can i do it? i need emergency help. thx a lot #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> struct information { int CNP; char* nume; int varsta; }; struct bynarytreenode { information info; bynarytreenode *left, … | |
Im trying to open a file, and then read a user defined number of characters from said file. I want to do this using scanf but I can't quite figure out how it works. I can get scanf to work just fine but I can't determine how to specify the … | |
hi, Through getter setter methods we can indirectly access private data members of the class as shown in the below code. Then what is the significance of encapsulation in OOPS concept. I am not getting the appropiate answer for that. Can anyone help me? Thanks in advance [CODE] #include<iostream> using … | |
hello frnd this a c program that removes c c++ style comments | |
Alright, I am in college started last year for programming in C++. Not even a year ago, I took fundamentals which was basically pseudocode and flow charts. 3 months ago, I finished my programming 1 class and this 11 week quarter is my Programming 2 class. Well the final project, … | |
I have a vector full of decimal values and I want to convert each element of the vector to ASCII represented strings (or char arrays). How do I do this? Each element of the array is 8 hex bits long and has been converted to it's decimal representation. So... HEX(41424344) … | |
Hi, New to this forum. Will be happy for explanation for the next phenomenon: [CODE] class Base { protected: void add(void *); }; class Derived : public Base { public: void add(int); } void Derived::add(int num) { add(new int(num)); } [/CODE] This fails with the message: Invalid conversion from 'int*' … | |
hi evrybdy.... how can i generate a unique code against the user input in c++... | |
its a wrapper class. it combines stl stack class with a custom user class. i made it so that i could rename push and pop if i wanted or size and top :) best of all it combines stack and classes :) something i made to see if i could … | |
Hey All This code is for matching a string with a wildcard in it to another string. If you want to have a Astrix in the first string be counted as a character and not as a wildcard put a \ in front of it. I have tested it for … | |
I have a working cpp file, lets just say it performs a+b, the filename is abc.cpp. I want to call up that file, function, in another file without having to rewrite the code and simply call up the function in another cpp file, xyz.cpp and simply map my variables over … | |
I am creating a winsocket app & want to know that if there's a method available to fetch the Dynamic IP of the local machine & not it's local address. For eg: my local address may state 192.168.1.3 but my dynamic IP is depedent on my ISP location like 59.114.25.10 … | |
Is there a good way to map vectors? Here's an example of what I mean: vec0 = [0,0,0,0,0,0,0,0,0,0,0] vec1 = [1,4,2,7,3,2] vec2 = [0,0,0,0,0,0,0,0,0] vec2 = [7,2,7,9,9,6,1,0,4] vec4 = [0,0,0,0,0,0] mainvec = [0,0,0,0,0,0,0,0,0,0,0,1,4,2,7,3,2,0,0,0,0,0,0,0,0,0,7,2,7,9,9,6,1,0,4,0,0,0,0,0,0] Lets say mainvec doesn't exist (I'm just showing it to you so you can see the general … | |
So I am in the process of writing simple client type program that send files over ssh. My goal is to have a shell script that interacts. for an example if i wanted to send a file to the server it wound be something like 'foo send FILENAME'. My question … | |
what is the best way to start out making a game??? Are there any good books on making one??? | |
#include "stdafx.h" #include <iostream> #include <ilsolver/ilosolverint.h> ILOSTLBEGIN using namespace std; const char* Suppliers[] = {"Bonn", "Bordeaux", "London", "Paris", "Rome"}; int main(int argc, char** argv){ IloEnv env; try { IloModel model(env); IloInt i, j; const char* fileName; if ( argc != 2 ) { env.warning() << "usage: " << argv[0] << … | |
I'm having difficulty using reinterpret_cast. Before I show you my code I'll let you know what I'm trying to do. I'm trying to get a filename from a vector full of data being used by a MIPS I processor I designed. Basically what I do is compile a binary from … | |
i've sudoku to make and for that, i need to generate it too. so for the generation, i've decided out that filling each successive column is a task of filling each column cell in the same row with a random no but seeing that it isn't already there in that … | |
I'm looking for a good introductory book for 2D OpenGL Game Programming. The only books on OpenGL I've seen were on 3D. Does anyone know of a good 2D OpenGL Book? Thanks in advance, EpicAsian | |
I am working in open gl using visual c++.I have made a quad a balls.Now i want to bounce the balls on quad repeadetly but i donot know how to do this??i thought of timerfunction to use but i donot know how to use it??which coordinates to set.here is the … | |
i have created a vc++ empty project in vs 2008, then i have added a simple c++ file and code is as follows [code] #include<stdio.h> int main() { printf("abc"); } [/code] now i want to make an exe file of this, actually i have complete project and i an exe … | |
Hello, I'm not too experienced with C++ (I know C# pretty well), and I can't figure this out. I've got two files, Form1.h and Utility.h. Form1.h is initialized when the program starts, and when the user clicks a button, it should call some functions in Utility.h. Now the problem I … | |
Hello. A while back I wrote a program called 'divvy' ([URL="http://www.cerberusgate.com/divvy.zip"]http://www.cerberusgate.com/divvy.zip[/URL]) in C++. It works fine on my system, but I have received several complaints that it does not work on other systems. This is the error: [QUOTE]Error: The Side-by-Side configuration information for "C:\DIVVY.EXE" contains errors. This application has failed … | |
Can I have an overall about game main loop, it seems to be complicated :-/ Thanks | |
I will arrange my output in well-alligned columns, but I don't think I should use 3D char arrays since my teacher just wants us to stick with what we've learned so far. Check out my code. I'm happy about it, but I just can't get the alignment right. [CODE]//File: lab9.cpp … | |
I'm trying to figure out how to get a string from an array starting at some given position. Say we have an array that's arbitrarily long and my string starts at location 1000. If I wanted to get a string from a file I would simply use something like getc … | |
hello guys!!!!!!!!!!! please,i have tried as much as i can to sort a given name alphabetically.but,i couldn't get it.please, help me. |
The End.