49,761 Topics

Member Avatar for
Member Avatar for linhj

Hi All, I am tring to using the below function to read in a .txt file, which consist of a 10x10 matrix number. I just cannot find out where goes wrong, it appears such a funny number -858993460... [CODE]void readinput(int in[][MAXCOLS]) { int row ,col,ip; //Declare row,col, ip as int …

Member Avatar for linhj
0
3K
Member Avatar for namratag

What is the difference between Release and Debug modes in Visual Studio while building a project?

Member Avatar for Ancient Dragon
0
204
Member Avatar for Zssffssz

Ok simple question. Google didn't bring up much and I need this. This is the question: How do I interact with non-text files in a simple console app?

Member Avatar for vijayan121
0
172
Member Avatar for aKiLa.. :)

i want to do a project using graphics in c++..i am going to start with a simple project, because i am a beginner.. plz tell me which websites to refer in order to get help on topics and to learn about graphics in c++.. thank you.. :)

Member Avatar for Ancient Dragon
0
228
Member Avatar for namratag
Member Avatar for Narue
0
45
Member Avatar for stereomatching

[code] void test_rr(std::string const &lvalue) { std::cout<<"this is lvalue"<<std::endl; } void test_rr(std::string &&lvalue) { std::cout<<"this is rvalue"<<std::endl; } int main() { test_rr("this is"); //will output "this is lvalue" std::cout<<"system pause"<<std::endl; std::cin.get(); return 0; } [/code] how could I treat "this is" as rvalue reference? The easiest way I could think …

Member Avatar for stereomatching
0
280
Member Avatar for praky

I have been asked to implement airline Reservation Simulation system using Data structures as part of B.Tech Minor Project. I have good knowledge of C++ but none of Visual C++ (except how to draw forms). But we also need to implement UI. So we are thinking of implementing UI using …

0
58
Member Avatar for beaute

Hello. I have a problem and I would love it if I could get some insight on it. I have read the forums with many answers about the subject, but I'm still having problems so I'm writing here. Basically I was following [URL="http://tom-shelton.net/index.php/2008/12/11/creating-a-managed-wrapper-for-a-lib-file/"]this[/URL] guide which is for creating Managed Wrapper …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for DSTR3

I'm using Visual Studio 2010, Win 7, MS Access 2010, C++, Direct ODBC, 32 bit. The first SELECT statement executes. The INSERT, SELECT, SELECT and UPDATE statements don't nay help is appreciated. Thanks. [CODE] #include <windows.h> #include <stdio.h> #include <sqlext.h> const char* DAM = "Direct ODBC"; SQLCHAR szDSN[256] = "Driver={Microsoft …

Member Avatar for Ancient Dragon
0
112
Member Avatar for valestrom

Just wondering, how high can c++ really count? Because I made a fibonacci program, and it starts acting weird and printing negatives at about 10-11 places. With both long, and int variables? Is it impossible to count higher? If not, how?

Member Avatar for Clinton Portis
0
248
Member Avatar for namratag
Member Avatar for Zssffssz
0
84
Member Avatar for Stokes37

I can not figure out how to go to the next line. In the data we read in number of test on the 1st line then student names followed by their test scores on the following lines. My problem is I can only get the first student and his average …

Member Avatar for Stokes37
0
138
Member Avatar for ben1996123

What I want to do is read a whole paragraph of text from a custom file. How would I do this without doing something silly like this? [CODE]while(someFile >> word1 >> word2 >> word3){ //etc. }[/CODE] I need to be able to read 3 numbers for todays date, then read …

Member Avatar for Zssffssz
0
928
Member Avatar for Zssffssz

Ok when I use gcc (all th time) the program it makes in c++ with debug on is around a megabyte when off it is around half a megabyte when working with c with debug on it around 50 k with it off it's at about25 k this doesn't seem …

Member Avatar for mike_2000_17
0
183
Member Avatar for sandman64

[CODE] #include <iostream> #include <fstream> #include <string> using namespace std; string constestantName(istream &); void getJudgeData(istream &, string); void CalcScore(ostream &, string, double, double, double, double, double); double findLowest(double, double, double, double, double); double findHeighest(double, double, double, double, double); int main() { int loopnum, counter, nestcounter; string name; ifstream infile; infile.open("starsearch.txt"); …

Member Avatar for Mr. K
0
209
Member Avatar for Mr. K

I make a program that reads a file and then it stores the information in two char.The problem is related to the char Elements and symbol. What is causing errors in my program? Thanks in advance. [CODE]#include "stdafx.h" #include <iostream> #include <fstream> char* Elements;//The problem char * symbol; using namespace …

Member Avatar for Mr. K
0
210
Member Avatar for KanazawaFTW

I have an assignment to create a file with number 1-20, and another one with numbers 100-5 decreasing by 5. I've got those two down, but then I need to multiply both those files together one by one and have the answer output to another file. ie: 1*100= 100, 2*95= …

Member Avatar for Clinton Portis
0
188
Member Avatar for sandman64

[CODE]#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; string constestantName(istream &); //Calls the the input file from main() by refrencea and returns the name of the contestant void getJudgeData(istream &, string, int); //gets the scores from starsearch.dat and stores them in five veriables void CalcScore(ostream &, string, …

Member Avatar for sandman64
0
137
Member Avatar for senergy

Hi, I have searched a lot of tutorials on how to make owner-drawn icon buttons, but a lot of them are a little bit hard to understand for API newbie and done in run-time, not with resources (I like resources!) so, can someone create/post some nice and simple tutorial on …

0
54
Member Avatar for tyricec

I'm trying to compile this simple dot program with C++ that uses OpenGL. I made a struct GLintPoint to hold just points x and y. It seems I didn't delcare the struct according to the errors. [CODE]#include <GL/glut.h> #include <stdlib.h> #include <time.h> struct GLPoint { GLint x; GLint y; }; …

Member Avatar for tyricec
0
942
Member Avatar for pendo826

[CODE]#include <iostream> #include <string> using namespace std; //char inventoryRequest = 'i'; //Function Definitions. void exitGame(); int playGame(); int main() { //Menu Text. cout<< "\t******Menu******\n\n"; cout<< "Please choose one of the following:\n"; cout<< "1 -Play Game.\n"; cout<< "2 -Exit.\n"; int choice; cout<< "Choice: "; cin>> choice; string name; switch (choice) { …

Member Avatar for pendo826
0
2K
Member Avatar for flynismo

Hi.. this is not a "which is better" thread, although if you happen to have a reason for thinking so, please share your thoughts. First I just want to say that I do not want to have any flame wars or arguments or anything like that. Please keep emotional arguments …

Member Avatar for rubberman
0
198
Member Avatar for Awah Mohamed

hello people. how are you all doing? my problem is i have been programming in c++ for almost a year now but i have always used windows with microsoft visual studio and dev c++ but now i discovered that programming in ubuntu is much more fun couz it is way …

Member Avatar for Awah Mohamed
0
203
Member Avatar for Himajin Breaker

Hello everyone. I am having a problem with my program; it is supposed to read values from an input text file, put the data into a structure, then output the data from the structure into a binary file. The first 2 parts work fine, but I keep ending up with …

Member Avatar for Himajin Breaker
0
398
Member Avatar for Mopikope

Hello everyone I am a college student learning c++ and I am not understanding why you put a "For loop" inside of another one. What advantage does it have and what can you use it for. For example: [CODE]for (int i = 0; i < 5; i++){ for (int g …

Member Avatar for Mopikope
0
127
Member Avatar for elmoe26

Hi. I have to write a program that solves the Knight's Tour in C++. The Knight's tour is where the Knight Chess piece has to move to every space on the chessboard only once. I am new to programming and I'm having trouble figuring out why my program has stopped …

Member Avatar for elmoe26
0
3K
Member Avatar for Chuckleluck

I'm using the Win32 API to create a game, and I want to give the player as big of a field of view as possible. The problem is, with the game engine I've developed (from Michael Morrison's [I]Beginning Game Programming[/I]), I can minimize and close the program, but I can't …

Member Avatar for Fbody
0
167
Member Avatar for sunn shine

i want to write an algo about stack example.. that is, ""When a person wear bangles the last bangle worn is the first one to be removed and the first bangle would be the last to be removed. This follows last in first out (LIFO) principle of stack."" how to …

Member Avatar for sunn shine
0
120
Member Avatar for linhj

Hi All, I am new to C++, I am tring to generate the random number from 0-99, and save it to a matrix array with the size of 10x10. Below is my code, the resule comes out funny. Can you help to see what goes wrong? [CODE]#include<stdio.h> //Header file #include<stdlib.h> …

Member Avatar for linhj
0
4K
Member Avatar for skylinedrifter

Hey guys im trying to write a code to give me Arthimetic mean and standard deviation for 4 Integer values... i don't know what im doing wrong it's not letting me compile any ideas?? [CODE] #include <iomanip> #include <iostream> #include <cmath> using namespace std; int main(void) { int X1; int …

Member Avatar for jhonlarry12
0
188

The End.