49,761 Topics
| |
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 … | |
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() ) … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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> … | |
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 … | |
| |
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, … | |
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. | |
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 … | |
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. … |
The End.