49,761 Topics

Member Avatar for
Member Avatar for littlestone

There are two way to define a character array constant: 1. const char* const OUT_STRING="hello world"; 2.const string OUT_STRING="hello world"; which one is better? why?

Member Avatar for vijayan121
0
61
Member Avatar for Lensva

new guy in this sphere, dont bash too much :S [code] #include <iostream> using namespace std; int main() { int x,y; cin>> x; cin>> y; if (x==0) cout<< "x = 0"; else cout<< "x isnt 0"; return 0; } [/code] this piece works ok but if i add 1 more …

Member Avatar for Lensva
0
103
Member Avatar for technogeek_42

can any body here knows how to create a program that will count the vowels and constants for example: the quick vowels:3 constants:5 can any one help me or can any one have idea on doing that using #include <string.h>

Member Avatar for technogeek_42
0
62
Member Avatar for fluidtype

Hello there! I was asked to replace the bitmaps in an existing software. The software was compiled using Visual C++ 8. Do you guys have any idea how to go about this? Cheers!

Member Avatar for fluidtype
0
120
Member Avatar for varsha0702

hi... I have been assigned a task of porting Windows DLL on Linux... DLL is being created using C++ and IPP (Integrated performance Primitives,set of libraries). VC++ IDE has been used for wring the DLL... I know that in Linux Shared Object is being used in place of DLL... But …

0
68
Member Avatar for cseale03

Hey everyone! I have been working on this project for about a week now. It reads in a text file and outputs how many times the top five characters are used, what the percentages are for the top five compared to the rest of the ASCII characters, and shows the …

Member Avatar for cseale03
0
101
Member Avatar for teked

Hi i have just begun to develop a calculator in C++.net. I have created 10 buttons on the form 0 to 9 and the usual operands + - * / = etc. I want the code to work out the preceidence i.e. * before / etc but cant seem to …

Member Avatar for priyad2
0
161
Member Avatar for technogeek_42

can anyone here who knows where can i find the posted one problem that is to convert the month-day-year birthday to a simple day like sunday?? and who knows the answer to this problem using getdate setdate??

Member Avatar for technogeek_42
0
435
Member Avatar for Rand al'Thor

I want to make some functions that I expect I will use again and again, but I don't want to copy and paste them everytime I make a program that will use them. My thought was to make a .h file with a namespace. Would that work? Or would I …

Member Avatar for Rand al'Thor
0
165
Member Avatar for protito

im using eclipse with CDT. my program works right now as a single source file. i want to split into various, so is easier to keep coding. i have problems with includes and stuff. what is the right way to do this? i didnt find any tutorial for this.. thanks …

Member Avatar for protito
0
34
Member Avatar for Jennifer84

I am trying to open a file with this code but wonder what extension this file has. My project is under this path: c:\\Documents and Stteings\\Jennifer\\My Documents\\Visual Studio 2008\\Projects\\Form1 Under this path I have a File that is named "Form1". If I doubleclick this file VC++ opens. The problem though …

Member Avatar for WolfPack
0
86
Member Avatar for nurulshidanoni

How to count how many (3, 10 appears in data? I have done a little bit programming but abnormal program. (3 , 10) (3 , 31) (3 , 51) (3 , 71) (3 , 78) (3 , 97) (3 , 105) (3 , 113) (3 , 135) (3 , 138) …

Member Avatar for nurulshidanoni
0
85
Member Avatar for Jennifer84

How is it possible in C++ .NET to open a file on the computer. Lets say that I am trying to open this file. Is this possible to do. In this case, Wordpad will open. Thanks [code] "C:\\WordPadFile.rtf" [/code]

Member Avatar for Jennifer84
0
88
Member Avatar for adnanius

Hi again; Today I've got some silly questions about the translation of an algorithm to c++ :S (hey matrimkar, I found something that should work!:idea: ) well, my questions are in comments in this code: You can just read the first 2 paragraphs of the code, the 3rd one is …

Member Avatar for adnanius
0
109
Member Avatar for ArrogantLegend

So I have writing to a file and reading from a file. Now I need to be able to find specific data that was previously entered and saved to that certain file. Here is the code I have so far. [CODE] { ofstream myFile ("words.txt"); if (myFile.is_open()) { myFile << …

Member Avatar for ArrogantLegend
0
75
Member Avatar for SEOT

I need to sort a list with a bunch of numbers in separate columns. How would you sort a linked list with a bunch of numbers in separate columns. Anyone have any good examples to share or point me in the right direction. Please help - SEOT

Member Avatar for dougy83
0
127
Member Avatar for Jennifer84

I have a program that consists of 2 Forms in C++.NET. When I open Form1 that is my "StartForm", this Form comes up in the TaskBar as all applications and Folders etc on the computer. So when I open Form2 from Form1. Both these Forms will appear in the TaskBar. …

Member Avatar for Jennifer84
0
108
Member Avatar for jeffige

Following along a tutorial I entered code for a person to enter the age of five students. Then, the program is supposed to divide the five ages and display the result. It allows me to enter the ages, but as soon as I hit enter after inputting the fifth age, …

Member Avatar for highspeedhook
0
173
Member Avatar for Jennifer84

I have a .txt file that contains a lot of text. I will read the whole text file and output a new textfile with one change that is this: The txt file that I will read could for example look like this: [I]Value1 Value2 Value3[] Value4 Value5[][/I] What I am …

Member Avatar for Jennifer84
0
95
Member Avatar for manu1001

I've an old C function that calls a function pointed by a global function pointer. How do I get it to call a member function of a class object determined at run-time. It'll be complied in a C++ project of course. My main motive is reusability here. So I don't …

Member Avatar for vijayan121
0
294
Member Avatar for dkwantee

[CODE] [LIST=1] [*]void selectionsort(int numbers[],int arraysize) [*]{ int i,indes,large,j; [*] for(i=arraysize-1;i>0;i--) [*] { large=numbers[0]; [*] index=0; [*] for(j=1;j<=1;j++) [*] { if(numbers[j]>large) [*] { large=numbers[j]; [*] index=j; [*] } [*] } [*] numbers[index]=numbers[i]; [*] numbers[i]=large; [*] } [*]} [/LIST] [/CODE] i have been able to understand upto 7 line. can someone …

Member Avatar for manzoor
0
110
Member Avatar for Jennifer84

If I have a file like this and I want to copy this "File1" to "File2", how is this possible to do. So I will copy File1 so the new file with have the name "File2.txt". I know that: std::copy member exists but are not really sure how to use …

Member Avatar for Jennifer84
0
71
Member Avatar for amitahlawat20

class matrix { int **p; int d1,d2; public: matrix(int x,int y); //constructor allocates block of specified size /*I am not specifying contructor code*/ void get_element(int i,int j,int value) { p[i][j]=value; } int put_element(int i,int j) { return p[i][j]; } // [U][B]return statement encountering access violation during runtime , Help!!![/B][/U] };

Member Avatar for mitrmkar
0
97
Member Avatar for ctor

hi, i would like to code a toypiano using SDL and c++.--a simple program which will emit a note when a graphical representation of a piano key is clicked. how do i call a particular midi note(corresponding to piano note)using SDL.(i am beginner with SDL and midi stuff,with adequate knowledge …

Member Avatar for ctor
0
82
Member Avatar for ckins

I'm so new to arrays, I've read, I've made boxes...and yet I'm still clueless. So my task is to make a bingo card, so far I've made one column of numbers that don't repeat...something I'm very proud of, but to do that same thing with different ranges for 4 more …

Member Avatar for VernonDozier
0
285
Member Avatar for MasterDucky

Hi there! I'd like to check if a string is preceeded by another one. More precisely in this example i would like to check if there is "lion" right before "sleeps". Im using rfind() to search backwards but for some reason it starts the search from the beginning of the …

Member Avatar for MasterDucky
0
128
Member Avatar for vesper967

I'm working on a project that is supposed to parse through a text file (about the length of a book or small dictionary) and print out the index. The program does not need to keep track of the frequency of the word. The data structure I'm using is a binary …

Member Avatar for vijayan121
0
149
Member Avatar for nickthedivil

Hey I know i am over looking somthing small but can i get some help on line 23 [code](strcmp(chartryname, charname)==0 && (chartrypassword, charpassword) ==0){ [/code] I know this will not work its just to show what i am trying to do. I need to check two pairs of strings how …

Member Avatar for amitahlawat20
0
109
Member Avatar for kemboy

[code=cplusplus] /////////interface //appication.h #ifndef APPLICATION_MAIN_H #define APPLICATION_MAIN_H #include<string> using std::string; class appliance { protected: string Manufacturer; string Type; public: appliance(string a,string b); ~appliance(); void setManufacturer(string a); string getManufacturer(); void setType(string b); string getType(); void showDetails(); }; #endif [/code] [code=cplusplus] ///////implementation//////////////////// //appication.cpp #include<iostream> using std::cout; using std::cin; using std::endl; #include<string> using …

Member Avatar for kemboy
0
89
Member Avatar for digitz101

I'm having problem w/ this codes in bright red, when i'm trying to enter a name the first two letters are always not shown or when inside the inner looping, it don't show what the inner looping is containing. [code] #include <iostream> #include <iomanip> [COLOR="red"]#include <cstdio> // used for reading …

Member Avatar for Ancient Dragon
0
88

The End.