Beginners - November 2012 (Page 19)

adding only negative values in matrix.
 
#include<stdio.h> #include<conio.h> int main() { int i,j,a ,sum,m,n; printf("\ninsert lines : "); scanf ("%d",&m); printf("\ninsert columns :...
[1 reply] : if ( i < j ) sum = sum + a ; That's summing the upper trian... (by ne555)
Is it possible to randomly call subprograms?
 
I have a program that has ten subprograms, each of which contains a randomly generated sentence. The subprograms are called sentence0, sentence1, sentence2 etc...
[11 replies] Last: You can avoid having to differentiate between strcpy and strcat by ini... (by AbstractionAnon)
can someone please explain this
 
I am new to c++, about 3 months into it. I asked this question on another forum and when I asked for an explanation I was informed I didn't need to understand. ...
[6 replies] Last: This sample code was previously posted: if ('a' <= ch && ch <='z'... (by Chervil)
Appending elements from vector v to vector w.
 
How do I append all the elements of one vector to another vector? Ex. v = (3, 4, 5) w = (7, 9, 10) --------- v = (3, 4, 5, 7, 9, 10)
[3 replies] Last: v.insert(v.end(), w.begin(), w.end()); (by Chervil)
Help a noob with regex_search problem
 
I have this code that is not working, im very locked here: #include <iostream> #include <vector> #include <string> #include <windows.h> #include <algorith...
[6 replies] Last: Thanks for the suggestion. Installing it right now (by Learner7)
"Expected type-specifier" error
 
I am trying to make a wrapper class for TTF_Font from SDL_ttf.h #ifndef SDL_FONT_H #define SDL_FONT_H #include <iostream> #include <string> #include...
[2 replies] Last: Well, this is embarrassing but turns out it was probably due to me hav... (by maeriden)
[URGENT]ADVICE needed for absolute beginner
 
Hey all! I am a college freshman pursuing an engineering degree,I am really interested in working in the movie/gaming industry.Since i cannot take a beginner...
[6 replies] Last: Yes I picked up some concepts that I could not grasp in other books. L... (by greezmky)
Getting ASCII Code
 
So in this simple RPG in CMD I'm having trouble getting an ASCII character that was converted from a character. That sounds a little confusing so let me show yo...
[1 reply] : Declare Map2 as unsigned char Map2 . char can hold values bet... (by Null)
How to return number of occurences in a vector
 
I have a problem. I need to write a function that returns the number of times k occurs in v. How do I make it return the number of times k occurs in v? This is ...
[1 reply] : You should use accumulator variable and then return it: int countOcc... (by MiiNiPaa)
data types
 
int month = 9, day = 7; int month = 09, day = 07; are they the same? Does putting a zero in front mean it is octal instead of decimal number?
[3 replies] Last: Does putting a zero in front mean it is octal instead of decimal numb... (by MiiNiPaa)
search or read img.jpg format text from directory
 
How can we read image of name img.jpg format in my directory? I have many images in my directory . I have 1 to 20 image of name "img1.jpg , img2.jpg , ...
[no replies]
counting groups of strings or int
 
A brief explanation of what I am trying to do then my code thus far, and please note that I am a self taught beginner at this point. I modified a bitmap imag...
[no replies]
error: expected unqualified-id before â{â token
 
I've been at this for an hour now and I keep getting this error. Can somebody tell me what went wrong? (test.cpp:13:1: error: expected unqualified-id before ...
[2 replies] Last: Thanks (by UndeadNexus)
please help, dont understand error
 
So I'm working on a school project and i have a couple classes. In one of my classes, lets call it "RedLine" im instantiating a different class called "Passang...
[11 replies] Last: Mind, that I'm just skimming through the code and not yet looking thro... (by Nexius)
BST memory leak
 
I have been writing and debugging the code for a binary search tree. I have finished it to the specifications, and according to my test driver, it works fine. ...
[2 replies] Last: Thanks - formatting fixed. (by NightHawk22)
Simple weight checking program bugged?
 
Below I have my code for the weight checking program I'm building for my class. It reads your height, weight and tells you if you are at the ideal weight. (Si...
[2 replies] Last: I understand! I was reading it like a human and not a machine :P (by aidenkael)
Just a question
 
Sorry if it's a stupid question, I'm not very good at C++. But why are pointers useful? I have no idea what it's used for.
[2 replies] Last: Ah.. I see. Thank you for your help. (by RBX129K)
Suggestions welcome
 
So I'm trying to create a string. Based on the selection entered by the user, the program will store a sequence in the string. Then the program will ask the nex...
[2 replies] Last: Thanks for the link, but I continued to play with it a little and figu... (by Showdon)
by sbstd
Can't end While loop
 
Here's simple joke program Can't see why it can't end the loop/ #include<iostream> #include<Windows.h> using namespace std; void loading(); int main() { ...
[7 replies] Last: I'm very thankful for answer. That's hard part to understand for begin... (by sbstd)
by xdega
Splitting String in half?
 
Ok. So here is my problem. I have a program that needs to take input in the form of: "COMMAND VALUE" What I need to do is store each part of the input string...
[6 replies] Last: nvm, i got it. It was simply an issue of me using: std::cin>>input; ... (by xdega)
November 2012 Pages: 1... 1718192021... 75
  Archived months: [oct2012] [dec2012]

This is an archived page. To post a new message, go to the current page.