49,761 Topics

Member Avatar for
Member Avatar for AutoPython

Hey, I'm new to C++ (1 week, used to do Python), and it's very enjoyable, but I have an issue. In the following code: [CODE] int sizeofarray; cout << "Type size of array: "; cin >> sizeofarray; int myarray[sizeofarray]; ...........more code [/CODE] That isn't the code, but that is the …

Member Avatar for jonsca
0
162
Member Avatar for lochnessmonster

error C2664: 'strcmp' : cannot convert parameter 1 from 'WCHAR [260]' to 'const char *' [CODE]HANDLE pSnapList; PROCESSENTRY32 p32Info; BOOL p32Status; pSnapList = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); p32Info.dwSize = sizeof( PROCESSENTRY32 ); p32Status = Process32First( pSnapList, &p32Info ); while( Process32Next( pSnapList, &p32Info ) ) { [b][u]if( !strcmp( p32Info.szExeFile, processName.c_str() ) …

Member Avatar for pseudorandom21
0
178
Member Avatar for brendeg

Greetings all!~ I'm a newb when it comes to C++ and could use a bit of help with this code. It is supposed to take any character input, store it in array and then if there are lower case letters make them upper case. After if goes through the first …

Member Avatar for WaltP
0
498
Member Avatar for pato wlmc

Well, i'm really new into programming, and I'm not a native english sepaker, so please, if you dont't get what I'm saying don't get mad :) What I'm trying to do is this: [...] int i, numberOfStudents string studentName[100]; cout<<"Input the number of students"<<endl; cin>>numberOfStudents; cout<<"Input the student's names"<<endl; for …

Member Avatar for WaltP
0
3K
Member Avatar for Lelly

Hello, Can anybody explain to me how can I do: Implement the Random partitioning version of Quicksort. Take care that your data array is not copied (by value) into your subroutines, because you will sort the RandomEnglishDictionary.txt file. Report the first, 1000th and last elements in your sorted list. Thanks

Member Avatar for mrnutty
0
530
Member Avatar for 6sons
Member Avatar for InfestedLawyer

I've seen this problem a few times and I've tried what they've done. I am still not passing my Array correctly. I'm all templated up because of last files I have used for this program (Not in the code). If that could have something to do with it let me …

Member Avatar for InfestedLawyer
0
162
Member Avatar for NickOOOShea

Hey guys, so I have a bit of a problem. I have an idea for a game, and I have all the 3d models and such, but I have no clue how to program. I hired a couple of guys to work for me, but here's the thing. I have …

Member Avatar for DaSpirit
0
180
Member Avatar for DaSpirit

So I'm beginning to move onto the OpenGL 3 phase. I found some source code and I've been playing around with it. How would I implement something with the same effect as glTranslate, but without using any deprecated coding? I'm trying to make a 2D game engine with it. I …

0
60
Member Avatar for chess2009

Here is my code, I would like to check my input for errors in the first and lastname parts. it means that these two parts should contin just upper and lower case letter and hyphens(cin must be used as well). [CODE] #include <iostream> #include <string> #include<cstdlib> using namespace std; struct …

Member Avatar for jonsca
0
145
Member Avatar for mskittles

I have a simple if statement going from 0-360 in 30 degree increments. I want to store those values into into an array because I need to use them for simple calculations later. I think I need an dynamic array because what I tried below is not working. So I …

Member Avatar for gerard4143
0
92
Member Avatar for Tuloa

Ok I drew a simple maze and what I am doing for collision to determine if you can move is use glReadPixels which I offset by the width of the square starting at the coordinates of the player which is passed to the function. Here is the function should someone …

Member Avatar for mike_2000_17
0
558
Member Avatar for atticusr5

Hello all, So I am new to the whole STL List class, and I am a little confused. In the past I have always had two classes, a data class and a "linked list" class. So now I have a bit of a pickle when I try to make a …

Member Avatar for atticusr5
0
131
Member Avatar for Tripandthenfall

Hi there im really new to C++ and im supposed to be doing a maturity calculator and i keep getting error code c2661 no overload function takes 1 arguments. Please look over my code and let me know everything that i have screwed up on because im sure there is …

Member Avatar for gerard4143
0
82
Member Avatar for ROTC89

I am trying to make a maze program. It is suppose to display the maze before it is solved, then solved. After that is should be able to random generate a different maze that needs to be solved. My problem is that when I compile I get this, Any suggestions …

Member Avatar for ROTC89
0
211
Member Avatar for pritpal.singh88

hi friends and seniors i want to play (add audio files, remove audio files,and other oprations) players(like vlc) through c++ coding in Ubuntu help me out. how do i do this. i don't even have idea... i know how to accept input from command prompt

Member Avatar for ravenous
0
416
Member Avatar for jonspeidel

so im taking the advice of 1ML, seems like a smart guy, and starting a second thread for the controversial, main calling, system calling, devil code, anyway i did take your guys advice and cut out the main calls and reduce everything to one fuction. however! ladies and gentlemen we …

Member Avatar for 1ML
0
398
Member Avatar for gregarion

Hey guys , i am having a problem with string arrays. Basically ,i declared my array in the header file. Here is my prog. [CODE]Main.cpp using namespace std; int main(){ string Test = "fat"; e te; te.b(Test); } Test.h class e { public: void b(string) string a [ ]; int …

Member Avatar for Ancient Dragon
0
150
Member Avatar for ITHope

okay so we have to create a coursework submission system where students submit there assignments and the teacher can get the assignment grade it and send back to student and if they want to add ocmments they can add comments.. i am so lost with how to create a system …

Member Avatar for ITHope
0
175
Member Avatar for KazenoZ

Hello, This is something that I need to do in my program, that's a little though for me to define in a few words for Google, I couldn't find any useful results. The thing is this, I have a program that creates a bunch of code files(.cpp and .h, in …

Member Avatar for KazenoZ
0
146
Member Avatar for Tuloa

I can use the program fine without this code but I need to be able to take a line of text a file and read it into a variable. Here is the code causing the app crash: [CODE] string ReadLine() { getline(file, lineread); if (lineread.find_first_of("WSF_") != string::npos) { return lineread; …

Member Avatar for Tuloa
0
199
Member Avatar for Sahilroy

Creating and maintaining a database. The program should make use of functions, linked list, structures, arrays, pointers, and data files (input and output files). It should be able to do the following: Add record, delete record, update record, Sorting & Searching (on both string and numbers), triggers, and alert messages …

Member Avatar for techsurge
-7
121
Member Avatar for spoonlicker

I'm sorry about my last bold post, I just like bold, but does any one know how the basics of mapping work and what mapping exactly is? I want to know because it might be necessary. And some sites I am banned from by IP so that's why I'm not …

Member Avatar for Nick Evan
-1
226
Member Avatar for spoonlicker

I'm having real complex problems with Windows API and a console application. The issue is that I can't have both windows active at the same time. I tried to include both headers, did both required tasks but only one of the windows opens. Here is the completed code: [code]#include <windows.h> …

Member Avatar for peter_budo
0
2K
Member Avatar for daniel1977

Dear Friends: I have a few questions. First, I want to say I am using Microsoft Visual C++ 2010 Express. 1. When creating a class, should it be in the main file? I assumed it was in the header files folder of the project. Maybe I am making this process …

Member Avatar for user422
0
158
Member Avatar for lochnessmonster
Member Avatar for pritpal.singh88
0
225
Member Avatar for lexusdominus

i wrote this a couple of years ago when i was just starting to program. i didnt know any professional programmers and wanted to learn, so just experimented with the language. maybe it will give you an insight into how people program for fun. feel free to add to it, …

Member Avatar for mike_2000_17
0
136
Member Avatar for spoonlicker

I want to know how to show C++'s application in a text-format in machine language through C++ itself. Does any one know how to do that? Sorry if I wasn't too descriptive, I can add more.

Member Avatar for spoonlicker
0
3K
Member Avatar for dennis.d.elston

For a homework assignment I need to write a function that computes the average value of an array of floating-point data: double average(double* a, int a_size) In the function, use a pointer variable, and not an integer index, to traverse the array elements. The code below is what I have …

Member Avatar for dennis.d.elston
0
187
Member Avatar for ana_1234

Hi, I am working on some practice problems for my class and I keep getting stuck on this problem. It is using linked list, I am bit stuck. The problem is to write a function int testloop (listnode *head) that checks to see whether the list 'head' contains a loop. …

Member Avatar for mrnutty
0
145

The End.