49,761 Topics

Member Avatar for
Member Avatar for dansnyderECE

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 …

Member Avatar for dansnyderECE
0
97
Member Avatar for catalyst491

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. …

Member Avatar for Ketsuekiame
0
236
Member Avatar for j-green.10

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

Member Avatar for jerry emmy
0
83
Member Avatar for ibrahim72ro

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, …

Member Avatar for daviddoria
0
178
Member Avatar for dansnyderECE

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 …

Member Avatar for dansnyderECE
0
94
Member Avatar for jerryjerry

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 …

Member Avatar for Fbody
0
150
Member Avatar for rohit83.ken
Member Avatar for btbam006

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, …

Member Avatar for packetpirate
0
135
Member Avatar for dansnyderECE

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) …

Member Avatar for daviddoria
0
206
Member Avatar for danizobin

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*' …

Member Avatar for danizobin
0
191
Member Avatar for riu

hi evrybdy.... how can i generate a unique code against the user input in c++...

Member Avatar for oz_engineer
0
222
Member Avatar for avarionist

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 …

Member Avatar for avarionist
0
121
Member Avatar for NathanOliver

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 …

Member Avatar for NathanOliver
4
479
Member Avatar for beaverkill

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 …

Member Avatar for n30h4x
0
7K
Member Avatar for nbaztec

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 …

Member Avatar for gashtio
0
203
Member Avatar for dansnyderECE

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 …

Member Avatar for daviddoria
0
101
Member Avatar for n30h4x

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 …

Member Avatar for n30h4x
0
155
Member Avatar for nwhitfield

what is the best way to start out making a game??? Are there any good books on making one???

Member Avatar for nwhitfield
0
69
Member Avatar for charlie4oct

#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] << …

Member Avatar for charlie4oct
0
244
Member Avatar for dansnyderECE

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 …

Member Avatar for gashtio
0
176
Member Avatar for ronnieaka

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 …

Member Avatar for gusano79
0
704
Member Avatar for epicasian

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

Member Avatar for epicasian
0
198
Member Avatar for nearest

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 …

Member Avatar for daviddoria
0
209
Member Avatar for haseeb1431

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 …

Member Avatar for haseeb1431
0
98
Member Avatar for catalyst491

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 …

Member Avatar for daviddoria
0
202
Member Avatar for dzhugashvili

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 …

Member Avatar for dzhugashvili
0
221
Member Avatar for Ayaat Monem

Can I have an overall about game main loop, it seems to be complicated :-/ Thanks

Member Avatar for Ayaat Monem
0
144
Member Avatar for queensrose

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 …

Member Avatar for IrinaG
0
262
Member Avatar for dansnyderECE

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 …

Member Avatar for dansnyderECE
0
127
Member Avatar for gedaahmed

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.

Member Avatar for Fbody
0
70

The End.