49,760 Topics

Member Avatar for
Member Avatar for FazeLessWhite

Hello Everyone , I Have Made a Simple C++ Code And I Get Some Errors I Have Been Trying To Solve this For Like 2-3 Days :( I am a Beginner in C++ #include <fstream> #include <iostream> #include <cstdlib> using namespace std; int main() { for char name[100]; int age; …

Member Avatar for zeroliken
0
116
Member Avatar for sujskiez

Write a C++ program such that its execution will keep asking the user to enter a pair of integers, start and finish, and will terminate when either start>finish, or EOF or an invalid input has been encountered. Every time a new pair of integers start and finish are read, the …

Member Avatar for zeroliken
0
199
Member Avatar for CPEBB

help me please this is a code #include <iostream> #include <string> using namespace std; class Student { private : int StudentID ; string FirstName; string LastName; string CourseName; double FirstExamGrade; double SecondExamGrade; double AssignmentsGrades [5]; double FinalExamGrade ; double Avr_Of_Assignment; double TotalGrade; public : void SetFirstName (string S1); void SetLastName …

Member Avatar for CPEBB
0
380
Member Avatar for fanii

1**. Write a c++ code to copy the contents of one string s1 into another string s2 by using loop where s1 and s2 are two dynamically created pointers.**

Member Avatar for ravenous
-1
42
Member Avatar for dakerao

Hello all I have a bunch of aggregate elements within my array. This array is for vertex positions in OpenGL. and I need to make a switch without having to bind more data to OpenGL. To do this I must put an if statement within the array or a booleon …

Member Avatar for MandrewP
0
187
Member Avatar for kkb08

I'm trying to write a program that asks the users for a set of numbers which the program then sorts and counts the frequency of. I struggling with understanding arrays. I have one array in particluar called frequencyArray that I'm trying to print but it keeps returning the value 0. …

Member Avatar for MandrewP
0
218
Member Avatar for dark_sider_1

Hi there, I feel really stupid since I'm a beginner at OpenGL with drawing. Is there something that I'm missing in the code? The line doesn't show up on the screen. Thanks! glClearColor(1.0f, 1.0f, 1.0f, 1.0f); glBegin( GL_LINES ); glColor3f( 1.0f, 0.0f, 0.0f ); glVertex3f( 100.0f, 150.0f, 0.0f ); glVertex3f( …

Member Avatar for mike_2000_17
0
970
Member Avatar for phorce

Hello, I'm trying to split a matrix (512x512) into blocks of (16x16).. Now I have managed to complete this for a small matrix (4x4) but when I try to implement it using the 512x512 it fails and doesn't produce enough blocks for the entire matrix. Here is the code on …

Member Avatar for histrungalot
0
200
Member Avatar for phorce

Hey, I'm doing a project and on the last little piece. It involved taking 2 matrices, splitting them into blocks and then checking whether the blocks are simular or not. If the blocks wasn't simular, then swap them /or/ create a new Matrix that holds the values of the second …

Member Avatar for histrungalot
0
101
Member Avatar for dark_sider_1

Hi there, I'm sorry if this is a vague question, but I've just been assigned to create a color animation project with GLSL, and I've never really used it before. The criteria for the assignment is that the animation should depend on object coordinates, vary over time and should use …

Member Avatar for dark_sider_1
0
264
Member Avatar for Chuckleluck

Hello, I would like your opinion on my collision detection & jumping code. Is it efficient enough to be used in a full-blown game? Any ideas on how I could improve the efficiency of the code? Any bugs? Please reply with (constructive) criticism, comments & suggestions. Link: http://dl.dropbox.com/u/56274235/Working%20Collision%20Detection%20%26%20Jump.zip Thank you …

0
110
Member Avatar for ABDYY

Hello everyone..... The code bellow is a program that output single_sound with every Character printed on the output screen... #include<iostream> #include<string> #include<Windows.h> #include<mmSystem.h> using namespace std; int main() { system("color 0A"); string s="Welcome"; for( int i=0;i<=10;i++) { for ( int j=0; j<s.length(); j++) { for( int k=0; k<1; k++) { …

0
40
Member Avatar for jasleen_kaur

Hello, I want my program to take input from a file rather than from keyboard and also output it to a file not screen. I tried writing prgram. This is what I wrote in visual studio... 1. #include<iostream> 2. #include<conio.h> 3. #include<stdio.h> 4. using namespace std; 5. void main() 6. …

Member Avatar for jasleen_kaur
0
1K
Member Avatar for bathtubbuddy

Hi everyone, im programing an agenda in c++ but im having a little trouble erasing an entry. Sorry the code is long, i was too lazy to use call functions... anyways bear with me. i tried setting the value to NULL on the entry i want to erase but that …

Member Avatar for Lerner
0
210
Member Avatar for jonnyboy12

Hello all. I am working with threads at the moment in my program. The thread is simple and looks like this. Thread oThread = gcnew Thread( new ThreadStart( this,&qualifiedlist::ThreadProc ) ); oThread->Start(); I have another simplar thread like this but its more complex. I try to set variables in it …

Member Avatar for mike_2000_17
0
116
Member Avatar for Tinier

Recentlt, I need to insert comment in my pf document, but I never try it and finds little information from the intenet, but I found that the PDF has the function of showing the comment and hiding the comemnt, so I try to convert a word document that contains comment …

Member Avatar for pattmorter
-1
202
Member Avatar for eliokdc

#include<iostream> #include<conio.h> using namespace std ; int main (){ string name; cin>>name; cout<<name; cout<<endl; getch(); return 0;} //if u run the prog, and u enter ur first and last name after hitting enter it will show u the first name. My professor asked me to search why this is happening, …

Member Avatar for ob3sus
0
93
Member Avatar for Borgan

Hello, I'm new here and I could use some help please. Im trying to learn c++ with a book called Programming Principles and Practice Using C++. Im on Chapter 3 now, and so far not having to many problems. But i am stuck on one of the exercises at the …

Member Avatar for ob3sus
0
212
Member Avatar for Tinier

Recently, I meet a problem that I need to insert header and footer in excel with C#, I use the following code: Worksheet sheet = workbook.Worksheets[0]; sheet.PageSetup.FullHeaderString = "E-iceblue"; sheet.PageSetup.IsPrintHeadings = true; sheet.Visibility = WorksheetVisibility.Visible; sheet.PageSetup.LeftFooter = "everlasting"; But when I launch it, the header and footer do not appear …

Member Avatar for Tinier
0
294
Member Avatar for iweir

So I'm working on an assignment where we have to make a deck of cards using a Card class and a Deck class and when I try and test the constructor by testing the size i get this: Running 1 test*** glibc detected *** runner: free(): invalid pointer: 0x00902ff4 *** …

Member Avatar for iweir
0
171
Member Avatar for greatman05

Is there a way to create a dynamic array without necessarily knowing the size beforehand? I need to specifically use a dynamic array for a homework assignment, and I don't really want to ask the user how large the array should be (in this case, an array of chars i.e. …

Member Avatar for greatman05
0
135
Member Avatar for Labdabeta

I want to find a range of values that a valid pointer cannot achieve, but can store. Basically this is my situation: typedef struct myNumberTAG { //stuff }*myNumberHANDLE; //A bunch of functions that work with myNumberHANDLEs: ///Not Shown //Some constants const myNumberHANDLE numberOne=0x1; const myNumberHANDLE numberTwo=0x2; const myNumberHANDLE numberInfinity=0x3; const …

0
56
Member Avatar for stormik

Hi there, I need to overload istream in this way: it needs to get string, then it has to parse this string and get number - can be longer than long long, and then save this number in another string, which I will give to class method. So far so …

Member Avatar for stormik
0
323
Member Avatar for nschessnerd

Hey, Ive been working on a program for a while, and once in a while it will crash for an unknown reason. I checked the error log and it says exception 0xc0000005 which means i'm writing somewhere i shouldn't. What are some common causes of this? Also is there anyway …

Member Avatar for MastAvalons
0
215
Member Avatar for mariel_1013

Hello, Can anyone help me? I am new to programming. I need to create a program that tracks sales. The store owner wants to keep track of monthly sales. 1. Ask the user for the monthly income of the store (one question per month) keep the numbers input 0-50. Store …

Member Avatar for mariel_1013
0
309
Member Avatar for mrcerimo

**Hello there! I have been learning c++ for now 6 months and when i started my goal was to use it whit openg or something similliar I made long, long list and its here:** *I learned this stuff from....YOUTUBE! from user called antirtfm and thenewboston and heres the things that …

Member Avatar for mrcerimo
0
398
Member Avatar for nikhil patwari

Hi Everyone, I had written the source code in .C file and compile it without any errors but when i run that program it gives me linker error. i.e. Linker Error : Undefined Symbol _getpid in module filename.c I am using TURBO C++ version 3.0. Pls give me the solution …

Member Avatar for Moschops
0
14
Member Avatar for Arob3

Ok im debugging this program for school and I have 3/4 parts done but im stuck on this part. class Outfit { private: Dress dress; Shoes shoes; double price; public: static const double DISCOUNT; Outfit(string, int, string, string, int, string); void displayOutfit(); }; const double Outfit::DISCOUNT = 0.20; Outfit::Outfit(string m1, …

Member Avatar for dark_sider_1
0
207
Member Avatar for Labdabeta

I currently have the following code for a sprite struct (c-style for use in DLL): typedef struct LABglSpriteTAG { unsigned int glTexture; int w; int h; LABglColour *data; bool compiled; }*LABglSpriteHANDLE; And the following function: void LABglSpriteConvolute(LABglSpriteHANDLE spr, int w, int h, int *kernel) { size_t dim=spr->w*spr->h; LABglColour *out=new LABglColour[dim]; …

Member Avatar for mike_2000_17
0
1K
Member Avatar for Mindless Z

Hey All, I've got an assignment due tonight involving semaphores, and I can't seem to figure it out. I'm given the following program: #include "stdafx.h" using namespace System; using namespace System::Threading; ref class PrintTasks { public: static bool runFlag = true; public: void PrintDigit(Object^ name) { while (runFlag) { Console::WriteLine((String^)name); …

0
68

The End.